Commit Graph

7254 Commits

Author SHA1 Message Date
Bart Van Assche
5c2594cec1 Added regression test for pthread cleanup handling.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10408
2009-07-04 12:20:04 +00:00
Bart Van Assche
3878443ab3 Enabled the DRD command line flags --var-info=yes and --check-stack-var=yes for the pth_cancel_locked regression test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10407
2009-07-04 12:17:58 +00:00
Bart Van Assche
16a8ccb531 Restored configure test for -Wno-empty-body.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10406
2009-07-04 12:17:07 +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
4fc7d06fcc Back out r10402 because it completely breaks things on Ubuntu 9.04 and
OpenSUSE 11.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10404
2009-07-02 20:47:53 +00:00
Julian Seward
71ce9d0f36 Fix missing backslash, which was causing serious weirdness during
'make install' for Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10403
2009-07-02 16:51:09 +00:00
Tom Hughes
3ddeb03e5b Replace strlen on amd64-linux with a simple version that doesn't
generate false positives.

Patch from Jakub Jelinek <jakub@redhat.com>. Fixes #190429.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10402
2009-07-02 13:02:12 +00:00
Julian Seward
6a98bb7307 Fix handling of the vex svn-version thing following r10400 (tracks vex
r1905).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10401
2009-07-02 12:36:53 +00:00
Julian Seward
d5c1e33874 Track file renaming in vex r1904, and get rid of temporary kludges
needed to handle multiple files of the same name in different
directories.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10400
2009-07-02 12:23:16 +00:00
Josef Weidendorfer
8138daf9d7 Fix handling of multiple signal deliveries in a row
This fixes bug 136154.

Background:
The function stack - CLG_(current_fn_stack) - is a stack of
pointers to the fn_node structs of the currently active
functions. This stack is used for determining current context
from call chain to current function, and modified on entering
(via push_cxt) and leaving a function.
Entering a signal handler will push a 0 to the function stack
to make the context only dependend on the call chain inside of
the signal handler.
Thus, delivering two signals in a row should push two times a
0 value onto the function stack. However, the second 0-push was
incorrectly suppressed, leading to a failed assertion when
returning from the 2nd signal handler.

This also fixes a bug with incorrectly zeroing global cost
counters when changing the execution context, introduced with
r10386.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10399
2009-07-01 23:56:23 +00:00
Bart Van Assche
af9cc02ba0 Switched to the just introduced ANNOTATE_*() macro's.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10398
2009-07-01 18:46:27 +00:00
Bart Van Assche
132ad89876 Added four more ANNOTATE_*() macro's / removed the API-warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10397
2009-07-01 18:45:45 +00:00
Bart Van Assche
71a7f50f90 Updated test instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10396
2009-07-01 18:43:11 +00:00
Bart Van Assche
7eade9466f Reran this script and updated the results table.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10395
2009-07-01 18:42:36 +00:00
Tom Hughes
839cf6c974 When looking for the text section in a PE executable ignore any
code section which is marked as uninitialised.

This can happen if you have incremental linking enabled in Visual
Studio, which causes a .textbss section to be added before the real
text section. We were picking up that .textbss section and using it to
compute the avma and bias for the code which was giving completely the
wrong results.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10394
2009-07-01 11:59:20 +00:00
Julian Seward
41a528f671 Update oprofiling notes a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10393
2009-07-01 08:12:22 +00:00
Julian Seward
3109865279 Merge in branches/DCAS.
This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901.  They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392
2009-07-01 08:10:49 +00:00
Nicholas Nethercote
c5fba35961 Add a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10391
2009-07-01 05:05:38 +00:00
Nicholas Nethercote
00f539d573 Remove the --all option from vg_perf. It's useless now that there are
tool-specific tests in massif/perf/ and memcheck/perf/.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10390
2009-07-01 04:50:41 +00:00
Nicholas Nethercote
b22bb6d5b9 Add some more functions to the default --alloc-fns list. Had to tweak how
verbose output is printed so that the tests would be ok, now that different
platforms have different alloc-fns lists.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10389
2009-07-01 02:44:12 +00:00
Nicholas Nethercote
d1f8801998 Just whitespace and comment changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10388
2009-07-01 02:39:26 +00:00
Nicholas Nethercote
97b2ffd409 Fix a problem with r10384: it was failing to read the ELF header if the
executable was less than 4096 bytes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10387
2009-06-30 06:06:14 +00:00
Josef Weidendorfer
81045dedcf Fix statistics with multiple changes of instrumentation state
This fixeds bug 150606.

When switching on instrumentation, the current function got the
wrong (too large) inclusive cost when instrumentation ever was on before.

The reason was that the global (ever increasing) event counters where
not reset on toggling instrumentation state. The global counters
are used to calculate inclusive cost of a function by getting the
difference of the global counters at leaving minus their value at
enter time. When leaving a function which was not encountered
to be entered before (a stack underrun of the shadow stack), it is
assumed that this function was entered with instrumentation switched
off. Then, the absolute value of global counters is used to calculate
the inclusive cost. Thus, these global counters have to be zeroed
at instrumentation change to allow for senseable inclusive costs
of functions which were not observed to be entered.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10386
2009-06-29 21:00:33 +00:00
Josef Weidendorfer
1191ffa0eb Change demangler to not use excessive space from stack
Replaces alloca with xmalloc calls.
This should fix bug 197988.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10385
2009-06-29 16:13:25 +00:00
Nicholas Nethercote
07a1251a20 Make the Linux launcher more like the Darwin one in how it reads the
executable headers.  This means it no longer crashes on an empty executable.
Fixes bug 156065.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10384
2009-06-29 06:57:30 +00:00
Nicholas Nethercote
a95af1babe Add a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10383
2009-06-29 05:19:15 +00:00
Nicholas Nethercote
0f65eba3c4 Suppression wasn't general enough. Caught by Jeroen Witmond.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10382
2009-06-27 01:06:04 +00:00
Bart Van Assche
06eb5d4a25 Applied the patch attached to http://bugs.kde.org/show_bug.cgi?id=165468: fixed some formatting inconsistencies.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10381
2009-06-26 19:03:53 +00:00
Nicholas Nethercote
363533b51b Suppress a leak in setenv(). Fixes bug 188572.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10380
2009-06-26 07:00:00 +00:00
Nicholas Nethercote
04e9b16dea An fd in the Darwin launcher wasn't being closed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10379
2009-06-26 04:35:51 +00:00
Nicholas Nethercote
512909dd91 Fix 'make check' for automake-1.7. Fixes bugs 197898 and 197901.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10378
2009-06-25 23:46:23 +00:00
Bart Van Assche
0e909781d4 Use the value set in the environment variable DRD_SEGMENT_MERGING_INTERVAL if the segment merging interval has not been specified as a command-line option.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10377
2009-06-24 18:35:02 +00:00
Bart Van Assche
45c852ee2e Changed default segment merging interval from 64 to 10.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10376
2009-06-24 18:34:10 +00:00
Bart Van Assche
778094eadd Added tool option --drd-stats=yes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10375
2009-06-24 18:33:47 +00:00
Nicholas Nethercote
26daa53d28 In VG_(get_changed_segments) use dynamic memory allocation rather than
static memory allocation to avoid hardwiring an upper limit on CSS_SIZE.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10374
2009-06-24 08:32:42 +00:00
Nicholas Nethercote
389b3f02e0 Remove some unnecessary tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10373
2009-06-24 08:32:07 +00:00
Bart Van Assche
f020382a31 The previous commit broke the 32-bit build, which is now fixed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10372
2009-06-24 06:44:49 +00:00
Nicholas Nethercote
5e7562af08 Add support for various aio_*() syscalls on Darwin. With them, Quicktime
runs, albeit incredibly slowly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10371
2009-06-24 06:25:36 +00:00
Nicholas Nethercote
94cf8ddabe Suppress a Cond error in pthread_rwlock_init(). Fixes bug 196528.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10370
2009-06-24 05:01:41 +00:00
Nicholas Nethercote
511e5090ca Add a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10369
2009-06-24 04:40:22 +00:00
Nicholas Nethercote
7eb329d028 Support and test mincore() on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10368
2009-06-24 04:15:29 +00:00
Nicholas Nethercote
03e20d86b7 Enable mincore() on AMD64/Linux. Hopefully fixes bug 197591.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10367
2009-06-24 04:02:19 +00:00
Nicholas Nethercote
de25e03eed Abort if a dir is given to --suppressions. Fixes bug 197456.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10366
2009-06-24 03:49:19 +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
Bart Van Assche
e6ca73c74b Fixed typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10360
2009-06-22 18:06:29 +00:00
Bart Van Assche
2b7c54cfae Statistics: fixed bug introduced in r10356.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10359
2009-06-21 18:09:02 +00:00
Bart Van Assche
6eb83dfd22 Statistics: do not only count DRD_(bm_new)() calls but also DRD_(bm_init)() calls as level one bitmap creation events.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10358
2009-06-21 18:08:31 +00:00
Bart Van Assche
6b937d7d95 Combined DRD_(thread_new_segment)() and DRD_(thread_combine_vc_sync)()
into the function DRD_(thread_new_segment_and_combine_vc)() because
before DRD_(thread_combine_vc_sync)() was called the function
DRD_(thread_new_segment)() was always called.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10357
2009-06-21 18:07:35 +00:00
Bart Van Assche
2a99145bc2 Made --drd-stats=yes output even more verbose.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10356
2009-06-21 11:51:23 +00:00
Bart Van Assche
7c518a0c3f Merged revisions 10129:10130 from the DRDDEV branch to the trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10355
2009-06-21 10:11:15 +00:00