157 Commits

Author SHA1 Message Date
Julian Seward
8885c4e740 Add initial support for Mac OS X 10.7 (Lion). Tracked by bug #275168.
* configure.in support

* new supp file darwin11.supp

* comment out many intercepts in mc_replace_strmem.c and
  vg_replace_malloc.c that are apparently unnecessary for Darwin

* add minimal handling for the following new syscalls and mach traps:
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost

* wqthread_hijack on amd64-darwin: deal with
  tst->os_state.pthread having an apparently different offset,
  which caused an assertion failure

* m_debuginfo: for 32 bit processes on Lion, use the DebugInfoFSM
  cleanup added in r12041/12042 to handle apparently new dyld
  behaviour, which is to map text areas r-- first and only
  vm_protect them later to r-x.



The following cleanups remain to be done

* remove apparently pointless, commented out wrapper macro
  invokations in mc_replace_strmem.c, eg

  //MEMMOVE(VG_Z_DYLD,        memmove)

  (or determine that they are still necessary, and uncomment)


* ditto in vg_replace_malloc.c, plus general VGO_darwin cleanups
  there


* write proper syscall wrappers for
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost
  These are currently just no-ops and may be causing Memcheck to
  report false undef-value errors


* figure out why it doesn't work properly unless built with gcc-4.2 on
  Lion.

  gcc-4.2 is the "normal" gcc (i686-apple-darwin11-gcc-4.2.1).  Plain
  gcc is the hybrid gcc-front-end clang-back-end thing
  (i686-apple-darwin11-llvm-gcc-4.2).  Whereas on Snow Leopard, plain
  gcc is the normal gcc.

  The symptoms of the failure are that wqthread_hijack in
  syswrap-amd64-linux.c hits this /*NOTREACHED*/ vg_assert(0); right
  at the end (you need a pretty complex threaded app to trigger this),
  which makes me think that either ML_(wqthread_continue_NORETURN) or
  call_on_new_stack_0_1 do return, which they are not expected to.


* figure out if some of the uninitialised value errors reported in
  system libraries on are caused by Memcheck being confused by LLVM
  generated code, as per bug #242137



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12043
2011-09-21 08:43:08 +00:00
Nicholas Nethercote
178baefe16 I am an idiot: remove the beginnings of an experimental tool that I
accidentally committed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11957
2011-08-08 02:27:20 +00:00
Nicholas Nethercote
a71f5978fc Fix a Massif bug: when realloc'ing a block, any values in the part of the
block beyond the original request weren't copied.  They are now.  This is
important because a program could use malloc_usable_size to gain legitimate
access to those extra bytes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11956
2011-08-08 01:58:50 +00:00
Julian Seward
634a591426 Add a file containing information on how to cross-compile for Android.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11888
2011-07-12 13:34:31 +00:00
Julian Seward
887fed8e7b Add a suppression file for Android's libc (bionic).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11873
2011-07-11 20:52:10 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Julian Seward
b71e8bb6c5 Rename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
too much build carnage.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11745
2011-05-11 16:04:28 +00:00
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00
Julian Seward
dae0b7a571 'make dist' fixes following s390x-linux merge. (Christian Borntraeger
<borntraeger@de.ibm.com>)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11616
2011-03-10 12:36:09 +00:00
Julian Seward
230002ce29 Add DHAT as an experimental tool. DHAT (a Dynamic Heap Analysis Tool)
is a heap profiler that is complementary to Massif.  DHAT tracks heap
allocations, and connects which memory accesses are to which blocks.
It can find the following information:

* total allocation and max liveness

* average block lifetime (# instructions between allocation and
  freeing)

* average number of reads and writes to each byte in the block
  ("access ratios")

* average of longest interval of non-access to a block, also 
  measured in instructions

* which fields of blocks are used a lot, and which aren't
  (hot-field profiling)

Using these stats it is possible to identify allocation points with
the following characteristics:

* potential process-lifetime leaks (blocks allocated by the point just
  accumulate, and are freed only at the end of the run)

* excessive turnover: points which chew through a lot of heap, even if
  it is not held onto for very long

* excessively transient: points which allocate very short lived blocks

* useless or underused allocations: blocks which are allocated but not
  completely filled in, or are filled in but not subsequently read.

* blocks which see extended periods of inactivity.  Could these
  perhaps be allocated later or freed sooner?

* blocks with inefficient layout (hot fields spread out over
  multiple cache lines), or with alignment holes



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11431
2010-10-12 10:09:15 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Julian Seward
73c516ce43 Include missing file, else tarball build breaks on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10836
2009-08-17 16:02:16 +00:00
Nicholas Nethercote
f8dfb1aa98 Enable Helgrind tests on Darwin -- only 4 of them fail on my machine.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10804
2009-08-14 02:12:54 +00:00
Nicholas Nethercote
0aea3c35b3 DRD now works on Darwin!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10596
2009-07-24 19:34:55 +00:00
Nicholas Nethercote
9c040c96bf Add exp-bbv to the tool-suite. I'm seeing a couple of amd64-linux test
failures, but they can be fixed up in-repo.  This resolves bug 198395.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10444
2009-07-14 01:39:54 +00:00
Nicholas Nethercote
30c6047c99 Include valgrind.spec in the tarball, as it makes things easier for
packagers.  Fixes bug 188560.

Also updated the contents of valgrind.spec.in a bit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10405
2009-07-04 00:38:11 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
c019d97d9d Get rid of ACKNOWLEDGEMENTS, because it overlaps hugely with AUTHORS.
Improve AUTHORS a bit at the same time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10309
2009-06-12 07:38:24 +00:00
Nicholas Nethercote
b67eef4699 Remove exp-omega's code. It was disabled in 3.4.0 to few complaints.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10247
2009-06-04 23:11:50 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
55bc428656 Fix a make dist problem with default.supp -- it was being included in the
tarball, and thus its contents depended on the machine 'make dist' was run
on, not the install machine.  This commit excludes it from the tarball,
so it will be built at compile-time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9909
2009-05-19 00:32:20 +00:00
Nicholas Nethercote
e91540cc58 Merged r9596 (build system tweaks, minus the Darwin bits) from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9598
2009-04-24 04:12:28 +00:00
Julian Seward
6b47103529 Update the sed expressions that handle the output of ld --verbose:
GNU ld changed the output of ld --verbose recently, it used to emit:
  PROVIDE (__executable_start = 0x400000); . = 0x400000 + SIZEOF_HEADERS;

  and now emits:

  PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x08048000)); . = SEGMENT_START("text-segment", 0x08048000) + SIZEOF_HEADERS;

(Jakub Jelinek)




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9157
2009-02-14 16:07:40 +00:00
Nicholas Nethercote
97ac32d13b Don't install unnecessary .supp files (part 2 of 2).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9125
2009-02-09 03:25:04 +00:00
Nicholas Nethercote
0b2d785793 Makefile.flags.am
Remove mentions of empty variables.

Makefile.am
    Only install default.supp;  other .supp files aren't necessary to
    install.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9123
2009-02-09 01:52:55 +00:00
Nicholas Nethercote
44f04e904c Avoid unnecessary EXTRA_DIST files in Makefile.am.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9112
2009-02-06 04:13:52 +00:00
Nicholas Nethercote
ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00
Nicholas Nethercote
ffbb6cb7b0 Generate default.supp at compile-time, not configure-time.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8994
2009-01-20 06:56:26 +00:00
Nicholas Nethercote
dafa3d1d8c trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/vcpu_bz2.c
trunk/memcheck/tests/vcpu_bz2.vgtest
    vcpu_bz2.c was (I think) an "svn copy" of perf/bz2.c.  Because it's a
    copy, the two can get out of sync, which was a problem with Greg
    Parker's Darwin patch.  So we remove vcpu_bz2.c, and make
    vcpu_bz2.vgtest invoke perf/bz2 directly.

trunk/cachegrind/tests/wrap5.c
trunk/cachegrind/tests/Makefile.am
trunk/cachegrind/tests/wrap5.vgtest
    wrap5.c was likewise an "svn copy" of memcheck/tests/wrap5.c, so we do
    the equivalent thing with it.

trunk/Makefile.am
    Fix a typo.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8919
2009-01-08 06:07:05 +00:00
Julian Seward
80801101b4 Include vg-in-place in the distro tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8823
2008-12-13 18:46:44 +00:00
Julian Seward
ab920f80a8 Adjust sed scripts used to generate the linker scripts on Linux, so as
to delete everything after the trailing ======.  This apparently makes
the system buildable with icc 9.1.  (patch from Philip Blakely).
Fixes #173099.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8758
2008-11-10 15:05:30 +00:00
Julian Seward
d18bee612c Merge (from branches/PTRCHECK r8599) a suppression file for exp-ptrcheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8677
2008-10-19 18:58:13 +00:00
Julian Seward
335992d8fc Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621
2008-09-18 18:12:50 +00:00
Bart Van Assche
6e368a9f37 Renamed exp-drd directory into drd. Moved drd from the experimental tool class to the class of regular tools.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8361
2008-07-04 15:14:35 +00:00
Julian Seward
e0aa666b28 Import recent suppression upgrades from 3_3_BRANCH:
revs 8163 8166 8167 8168.

Also, mention glibc-2.X.supp.in in Makefile.am so it gets included
in the distro tarball.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8176
2008-06-03 20:58:46 +00:00
Nicholas Nethercote
b966da4420 Test exp-tools by default as well.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7390
2008-02-10 22:19:58 +00:00
Julian Seward
1e888cfd02 Make a new regtest target, "all-regtest", being the union of "make
regtest" and "make exp-regtest".  Then change the nightly build system
to run all-regtest instead of exp-regtest.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7332
2008-01-09 21:03:43 +00:00
Dirk Mueller
bc2e4aa75a add glibc 2.7 suppression to the distribution list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7226
2007-11-26 14:54:36 +00:00
Julian Seward
54e5bf2856 Misc changes needed to support exp-drd (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7213
2007-11-25 14:08:53 +00:00
Julian Seward
1828c93b3b Preliminary support for Fedora 8, which includes initial support for
glibc-2.7.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7181
2007-11-18 14:40:02 +00:00
Julian Seward
d511a7a7df Add some Helgrind suppressions for LinuxThreads.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7146
2007-11-11 06:13:01 +00:00
Julian Seward
af406f51e9 Merge (from branches/THRCHECK) misc build-system changes. Nothing
significant.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7128
2007-11-09 23:30:51 +00:00
Julian Seward
5b02b70476 Add Bryan Meredith's Omega tool as an experimental tool. Maintainer
is Rich Coe.  Also, a minor mod to Makefile.install.am to handle tool
names with dashes in.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7112
2007-11-09 12:30:36 +00:00
Dirk Mueller
c01cc403f1 add glibc-2.6.supp to the distribution list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6767
2007-07-14 22:43:25 +00:00
Dirk Mueller
1ef58269c7 rename as _SOURCES is a reserved keywoard and breaks with newer
auto*foo: 
Makefile.am:110: variable `VEX_PRIMARY_SOURCES' is defined but no
program or
Makefile.am:110: library has `VEX_PRIMARY' as canonic name (possible
typo)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6384
2006-12-07 15:31:57 +00:00
Julian Seward
167543de97 Back out 'memtrace' related stuff until status of it is established;
having build system references to it without corresponding sources
causes build failures.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6323
2006-10-19 13:23:59 +00:00
Nicholas Nethercote
fad24de4bc Move VG_BUGS_TO to pub_tool_basics.h so that Nulgrind need not import
pub_tool_libcassert.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6320
2006-10-18 21:50:26 +00:00
Julian Seward
713b2d46c0 Merge r6086:
Makefile.am changes for AIX5.  Almost all boilerplate stuff fitting in
with the existing factorisation scheme.  The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
2006-10-17 00:56:43 +00:00
Julian Seward
dcf1fdd250 Include new file in tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6221
2006-10-14 14:03:51 +00:00
Nicholas Nethercote
991367c922 Merge in the COMPVBITS branch to the trunk. This is a big change to
Memcheck, replacing the 9-bits-per-byte shadow memory representation to a
2-bits-per-byte representation (with possibly a little more on the side) by
taking advantage of the fact that extremely few memory bytes are partially
defined.

For the SPEC2k benchmarks with "test" inputs, this speeds up Memcheck by a
(geometric mean) factor of 1.20, and reduces the size of shadow memory by a
(geometric mean) factor of 4.26.

At the same time, Addrcheck is removed.  It hadn't worked for quite some
time, and with these improvements in Memcheck its raisons-d'etre have
shrivelled so much that it's not worth the effort to keep around.  Hooray!

Nb: this code hasn't been tested on PPC.  If things go wrong, look first in
the fast stack-handling functions (eg. mc_new_mem_stack_160,
MC_(helperc_MAKE_STACK_UNINIT)).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5791
2006-03-27 11:37:07 +00:00