Commit Graph

6530 Commits

Author SHA1 Message Date
Bart Van Assche
975dd0de65 Added prereq clause.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8857
2008-12-21 17:44:32 +00:00
Bart Van Assche
9fc7c603a3 circular_buffer test now passes on systems with and without built-in support for atomic operations.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8856
2008-12-21 17:24:21 +00:00
Bart Van Assche
03d2506997 Added a suppression pattern for the data races triggered by the glibc function fflush().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8855
2008-12-21 17:21:05 +00:00
Bart Van Assche
a040d2e7b4 Fixed bug in vector clock updating for semaphores with non-zero initial value.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8854
2008-12-21 17:20:22 +00:00
Bart Van Assche
a0b0f8bf1e Added command-line option -n, which allows to disable locking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8853
2008-12-21 17:19:05 +00:00
Bart Van Assche
7ee41e9982 Replaced regular increment by atomic increment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8852
2008-12-21 17:16:03 +00:00
Bart Van Assche
a7dbb0d915 Made config.h include path consistent with the other regression tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8851
2008-12-21 16:10:36 +00:00
Bart Van Assche
60df83bbe4 Fixed typo: added missing right parentheses.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8850
2008-12-21 16:09:03 +00:00
Bart Van Assche
4a2635aaba Finished renaming of boost_threads into boost_thread.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8849
2008-12-21 16:08:36 +00:00
Bart Van Assche
fb0f4c006c Generalized the glibc _IO_file_xsputn suppression pattern. Added a suppression pattern for Boost.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8848
2008-12-21 16:08:07 +00:00
Julian Seward
a9c3419f36 Move description of --read-var-info= from the "debugging options"
section to the "uncommon user options" section.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8847
2008-12-21 10:45:55 +00:00
Julian Seward
a5d4c49d06 Following r8845, explicitly enable Dwarf3 variable/type info reading
on tests whose output depends on it.

 --This line, and those below, will be ignored--

M    helgrind/tests/tc20_verifywrap.vgtest
M    helgrind/tests/tc16_byterace.vgtest
M    helgrind/tests/tc01_simple_race.vgtest
M    helgrind/tests/rwlock_race.vgtest
M    helgrind/tests/tc06_two_races.vgtest
M    helgrind/tests/hg03_inherit.vgtest
M    helgrind/tests/tc21_pthonce.vgtest
M    helgrind/tests/tc05_simple_race.vgtest
M    helgrind/tests/hg04_race.vgtest
M    helgrind/tests/hg05_race2.vgtest


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8846
2008-12-21 10:44:28 +00:00
Julian Seward
28f3b05d68 Various changes:
* remove flags --trace-addr= and --trace-level=.  These no longer
  have any effect, so there's no point in having the associated flags.

* add flag --show-conflicts=no|yes [yes], which makes it possible to
  disable the conflicting-access collection machinery.  This makes
  Helgrind run much faster.  Perhaps useful in regression testing,
  when it is desired only to find out if a race exists, but not to
  collect enough information to easily diagnose it.

* add flag --conflict-cache-size= [1000000], which makes it possible
  to control how much memory is used for storage of information about
  historical (potentially-conflicting) accesses.

* Update comments on the conflicting-access machinery to more closely
  reflect the code.  Includes comments on the important aspects of
  the value N_OLDREF_ACCS.  Increase said constant from 3 to 5.

* Fix bug in event_map_bind: when searching for an OldRef.accs[]
  entry that matches the current access, don't forget to also 
  compare the access sizes.  The old code only compared the thread
  identity and the read/writeness.

* hg_main.c: disable Dwarf3 variable/type info reading by default.
  Mostly this provides little benefit and can cause Helgrind to use
  a lot more time and memory at startup.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8845
2008-12-21 10:43:10 +00:00
Julian Seward
9168f4d31e Rearrange suppressions a bit, and add a couple more from David Faure.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8844
2008-12-20 09:20:33 +00:00
Julian Seward
8588cc44e2 Update expected outputs for glibc25-amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8843
2008-12-19 09:46:17 +00:00
Julian Seward
907a49e8f8 Update the expected outputs following changes in Helgrind over the
past few weeks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8842
2008-12-18 20:21:13 +00:00
Josef Weidendorfer
ce5a8e1d66 Callgrind: add code pattern for runtime_resolve on OpenSuse11.0/x86
OpenSuse 11.0 has glibc 2.8, which changed the assembly code for
runtime_resolve. This patch rearranges the code search such that
multiple variants can be scanned.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8841
2008-12-18 19:48:35 +00:00
Julian Seward
cf3bb82242 Don't apply cross-compilation patch during the nightly build any more,
as it's no longer necessary.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8840
2008-12-18 08:33:24 +00:00
Julian Seward
b78563919c Move the functionality from filter_threadnums into filter_stderr, so that
it applies to all tests.  Then remove all references to filter_threadnums.

Also:

* match and transform not only "Thread #n" and "thread #n" 
  but also "Thread n" and "thread n", where n is [0-9][0-9]*.

* use -e ... for the sed commands where possible, to reduce the number
  of processes that have to be started




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8839
2008-12-18 08:27:32 +00:00
Julian Seward
84137d391d HG_(instrument): don't assert on Imbe_SnoopedStore{Begin,End}.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8838
2008-12-18 01:20:11 +00:00
Bart Van Assche
8ca92c847d Added another regression test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8837
2008-12-17 19:21:17 +00:00
Bart Van Assche
66d69c2025 Fixed semaphore vector clock updating / simplified semaphore tracing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8836
2008-12-17 19:20:13 +00:00
Bart Van Assche
56da8e035f Fixed grammar / split a paragraph in two.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8835
2008-12-17 19:15:58 +00:00
Bart Van Assche
9113a38572 Added a suppression pattern.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8834
2008-12-17 19:10:26 +00:00
Bart Van Assche
1d166694b6 Added a paragraph about the Boost.Thread library.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8833
2008-12-17 19:10:06 +00:00
Julian Seward
d06bc8892d Create rough entries for the 3.4.0 changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8832
2008-12-17 12:26:24 +00:00
Julian Seward
7bf24c8472 Include new file (why-no-libc.txt) in the distro tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8831
2008-12-17 12:25:05 +00:00
Bart Van Assche
7535e7be94 Fixed regression test tc20_verifywrap2, which was broken through r8829.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8830
2008-12-17 07:32:09 +00:00
Julian Seward
8a9f6dd234 Fix some format string mismatch warnings, associated with r8825.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8829
2008-12-17 01:21:06 +00:00
Julian Seward
5d0f2a664e Add another magic constant to the Iex_Const case in isBogusAtom, as
seen in glibc on ppc32.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8828
2008-12-17 01:12:58 +00:00
Nicholas Nethercote
aee8de8367 Add some useful info.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8827
2008-12-15 21:29:29 +00:00
Tom Hughes
2ebda825b1 Add support ioprio_get and wire up ioprio_set on all platforms.
Fixes bug #177819.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8826
2008-12-15 08:58:29 +00:00
Bart Van Assche
98c5646427 Added more semaphore tracing info.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8825
2008-12-14 08:56:49 +00:00
Nicholas Nethercote
18216143d9 Update an FAQ to account for --track-origins=yes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8824
2008-12-13 22:27: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
2dae239cce Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8822
2008-12-13 16:53:35 +00:00
Julian Seward
e33cdf7e4f Make sure $mflag_primary is used in the tests for Boost and QtCore
features.  Also add a big comment explaining why this is important.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8821
2008-12-13 16:45:19 +00:00
Julian Seward
7992575441 Avoid causing an assertion failure in VG_(make_ExeContext_from_StackTrace)
in the case where VG_(clo_backtrace_size) < N_FRAMES (that is, with
--num-callers=N where N < N_FRAMES).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8820
2008-12-13 01:20:21 +00:00
Julian Seward
54ea210268 Add a couple of suppressions relating to unwinding the stack following
pthread_exit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8819
2008-12-13 01:18:38 +00:00
Julian Seward
ba2ece03b8 This commit subtly changes the meaning of the values obtained via the
stack unwind mechanism (the function VG_(record_ExeContext) et al),
clears up some associated kludges, and makes suppression matching work
more reliably.

Prior to this commit, a stack snapshot contained, at [0], the IP of
the relevant thread, and at all positions [1] and above, the return
addresses for the open calls.

When showing a snapshot to the user (in VG_(apply_StackTrace)), and
searching the stack for stack blocks (in VG_(get_data_description)), 1
is subtracted from positions [1] and above, so as to move these return
addresses back to the last byte of the calling instruction.  This
subtraction is also done even in VG_(get_StackTrace_wrk) itself, in
order to make the stack unwinding work at all.

It turns out that suppression-vs-function-name matching requires the
same hack, and sometimes failed to match suppressions that should
match, because of this self-same problem.

So the commit changes the stack unwinder itself, so that entries [1]
and above point to the last byte of the call instruction, rather than
the return address.  The associated kludges in VG_(apply_StackTrace)
and VG_(get_StackTrace_wrk) are removed, and suppression matching is
observed to work in a case where it failed before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8818
2008-12-12 13:23:03 +00:00
Julian Seward
05e92e79d9 Fix format string warning in PRE(sys_eventfd2).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8817
2008-12-12 08:08:58 +00:00
Julian Seward
09dac86eca Add a new module, m_seqmatch, which does very simple sequence (regexp)
matching, in the function VG_(generic_match).  Patterns to be matched
against may contain only '*'-style wildcards (matches any number of
elements, we don't care what they are), '?' wildcards (matches exactly
one element, we don't care what it is) and literal elements.

It is totally abstractified, in the sense that the pattern and input
arrays may be arrays of anything.  The caller provides enough
information so that VG_(generic_match) can step along both arrays, and
can ask the questions "is this pattern element a '*' ?", "is this
pattern element a '?' ?", and "does this pattern element match an
input element ?".

The existing function VG_(string_match) is reimplemented using
VG_(generic_match), although the ability to escape metacharacters in
the pattern string is removed -- I don't think it was ever used.

In m_errormgr, matching of suppression stacks (including wildcard
"..." lines) against error stacks is re-implemented using
VG_(generic_match).

Further detailed comments are in m_seqmatch.h and pub_tool_seqmatch.h.

A negative side effect is that VG_(string_match) will be much slower
than before, due to the abstractification.  It may be necessary to
reimplement a specialised version later.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8816
2008-12-12 08:07:49 +00:00
Tom Hughes
4d4d4c10fe Add support for eventfd2 (and wire up pipe2 on PPC platforms).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8815
2008-12-10 09:28:56 +00:00
Bart Van Assche
3e81c1483d Added suppression pattern for random_r(), which is a.o. called by rand().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8814
2008-12-09 11:07:55 +00:00
Julian Seward
febfd1dcd8 Fix bug introduced by frame-level wildcarding changes for suppressions
in r8725.  (Konstantin Serebryany)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8813
2008-12-08 13:45:35 +00:00
Julian Seward
e352772610 Don't segfault the guest during a call MPI_Init(NULL,NULL), since
those are valid parameters to MPI_Init.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8812
2008-12-08 10:27:31 +00:00
Julian Seward
061e035f79 event_map_lookup: when looking for a previous access to an address,
find conflicting accesses that overlap the current access in any way,
rather than just match at the addresses.  This allows reporting of
conflicts between accesses which overlap but are not the same
size/alignment.

Doesn't seem to always work reliably, for reasons I don't understand,
but I so far failed to make a small test case.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8811
2008-12-08 00:12:28 +00:00
Julian Seward
24b526c62b Tidy up and comment sanity-checking code/configuration.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8810
2008-12-07 11:40:17 +00:00
Julian Seward
5da3926707 * In the conflicting-event mechanism, also record the size and
read-or-writeness of each access, so that these can be displayed in
  error messages.

* Use recorded read-or-writeness info to avoid producing error
  messages that claim claim two reads race against each other -- this
  is clearly silly.  For each pair of racing accesses now reported, at
  least one of them will (should!) always now be a write, and (as
  previously ensured) they will be from different threads.

* Lookups in the conflicting-access map is expensive, so don't do that
  as soon as a race is detected.  Instead wait until the update_extra
  method is called.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8809
2008-12-07 01:41:46 +00:00
Julian Seward
5aa3e073b7 * Add a VG_(sizeSWA) function
* Fix spacing a bit



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8808
2008-12-06 23:34:52 +00:00