725 Commits

Author SHA1 Message Date
Bart Van Assche
f2bc8e8162 Make it possible to #include <valgrind/drd.h> after <valgrind/helgrind.h>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12429
2012-03-08 14:44:57 +00:00
Bart Van Assche
068f948652 Rework r12363
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12365
2012-02-02 10:58:01 +00:00
Bart Van Assche
913d7fabc1 drd/tests/sigalrm: Report thread creation failure
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12364
2012-02-02 10:35:18 +00:00
Bart Van Assche
099ef8542e drd: Avoid that an assertion failure is triggered if clone() fails.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12363
2012-02-02 10:14:30 +00:00
Bart Van Assche
af76b5a089 drd: Remove drd/drd_list.h again because of its GPLv2 license.
For more info about Valgrind source code licensing, see also:
[1] Top level README line 51.
[2] http://valgrind.org/docs/manual/manual-intro.html#manual-intro.overview, last paragraph.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12356
2012-01-25 20:36:27 +00:00
Bart Van Assche
75a946033a Fix a copy/paste error
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12355
2012-01-25 11:05:12 +00:00
Bart Van Assche
509b7a03ab drd: Add command-line option --ptrace-addr.
This command-line option has been used to track down the recently fixed race in
drd/drd_pthread_intercepts.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12354
2012-01-24 18:39:29 +00:00
Bart Van Assche
f7db19c85a drd: Use macros and inline functions for list manipulation
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12353
2012-01-24 18:28:55 +00:00
Bart Van Assche
38b17ca6f4 drd: Avoid that the changes from r12351 trigger a race condition when copying DrdPosixThreadArgs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12352
2012-01-24 08:30:32 +00:00
Bart Van Assche
a1d8b80b36 drd, semaphore implementation: Only wake the associated futex if at least one thread is waiting
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12351
2012-01-23 17:01:58 +00:00
Bart Van Assche
135da8ceff drd: Source code refactoring - use DRD_(thread_get_vc)() wherever appropriate
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12350
2012-01-22 08:58:31 +00:00
Bart Van Assche
61dff515e6 drd: Source code refactoring - use DRD_(thread_get_vc)() wherever appropriate
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12349
2012-01-22 08:40:42 +00:00
Bart Van Assche
40ec829e21 drd: Rename DRD_STOP_TRACE_VAR() into DRD_STOP_TRACING_VAR()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12348
2012-01-21 18:33:56 +00:00
Bart Van Assche
586df569b3 drd/tests/fp_race_xml: Filter out thread number and vector clock information
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12347
2012-01-20 09:27:15 +00:00
Bart Van Assche
e76f96cd60 drd: Fix a race condition in the pthread_create() intercept.
Avoid that the futex wake call in DRD_(sema_up)() can get invoked after the semaphore has
already been destroyed. This is most likely the real fix for the bug described in the
commit message of r12332.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12346
2012-01-19 19:52:15 +00:00
Bart Van Assche
6cfdbe2eab drd: Switch to new pool allocator
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12344
2012-01-18 09:46:57 +00:00
Philippe Waroquiers
be97cddd7a Fixes 282230 group allocator for small fixed size, use it for MC_Chunk/SEc vbit
* new files include/pub_tool_groupalloc.h and coregrind/m_groupalloc.c
  implementing a group allocator (based on helgrind group alloc).
* include/Makefile.am coregrind/Makefile.am : added pub_tool_groupalloc.h
  and m_groupalloc.c
* helgrind/libhb_core.c : use pub_tool_groupalloc.h/m_groupalloc.c
  instead  of the local implementation.
* include/pub_tool_oset.h coregrind/m_oset.c : new function
  allowing to create an oset that will use a pool allocator.
  new function allowing to clone an oset (so as to share the pool alloc)
* memcheck/tests/unit_oset.c drd/tests/unit_bitmap.c : modified
  so that it compiles with the new m_oset.c
* memcheck/mc_main.c : use group alloc for MC_Chunk
  memcheck/mc_include.h : declare the MC_Chunk group alloc
* memcheck/mc_main.c : use group alloc for the nodes of the secVBitTable OSet
* include/pub_tool_hashtable.h coregrind/m_hashtable.c : pass the free node
  function in the VG_(HT_destruct).
  (needed as the hashtable user can allocate a node with its own alloc,
  the hash table destroy must be able to free the nodes with the user
  own free).
* coregrind/m_gdbserver/m_gdbserver.c : pass free function to VG_(HT_destruct)
* memcheck/mc_replace_strmem.c memcheck/mc_machine.c
  memcheck/mc_malloc_wrappers.c memcheck/mc_leakcheck.c
  memcheck/mc_errors.c memcheck/mc_translate.c : new include needed
  due to group alloc.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12341
2012-01-17 21:16:30 +00:00
Bart Van Assche
31e98a4515 drd: Remove prefix from local variable names
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12337
2012-01-16 13:08:05 +00:00
Bart Van Assche
b443a1b776 drd: Make it easier to enable the debug statements in the ELF section suppression code
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12333
2012-01-15 19:17:37 +00:00
Bart Van Assche
0515a0bb85 drd: Set up red zone before the first instruction of a thread is run.
Avoids that DRD sporadically reports mysterious false positive conflicting accesses on
amd64 like e.g. the following:

$ ./vg-in-place --fair-sched=yes --tool=drd --read-var-info=yes --check-stack-var=yes --show-confl-seg=no drd/tests/annotate_smart_pointer 50 50
==18170== drd, a thread error detector
==18170== Copyright (C) 2006-2011, and GNU GPL'd, by Bart Van Assche.
==18170== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==18170== Command: ./annotate_smart_pointer 50 50
==18170==
==18170== Conflicting store by thread 1 at 0x7fefff8a0 size 8
==18170==    at 0x400FCE: AnnotateCondVarSignal (unified_annotations.h:32)
==18170== Allocation context: unknown.
==18170==
==18170== Conflicting load by thread 1 at 0x7fefff8a0 size 8
==18170==    at 0x400FDD: AnnotateCondVarSignal (unified_annotations.h:34)
==18170==    by 0x401071: U_AnnotateHappensBefore (unified_annotations.h:46)
==18170==    by 0x4018DD: smart_ptr<counter>::set(counter*, AtomicInt32*) (annotate_smart_pointer.cpp:239)
==18170==    by 0x401778: smart_ptr<counter>::operator=(counter*) (annotate_smart_pointer.cpp:208)
==18170==    by 0x401377: main (annotate_smart_pointer.cpp:326)
==18170== Allocation context: unknown.






























git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12332
2012-01-15 19:13:35 +00:00
Bart Van Assche
d953fbfc3c drd: Refactor functions for starting / stopping to access stack memory
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12331
2012-01-15 19:08:13 +00:00
Bart Van Assche
f374300062 drd: Reformat three comment blocks
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12330
2012-01-15 19:02:20 +00:00
Bart Van Assche
2e744a997a DRD: revert r12308 because it didn't help
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12312
2011-12-17 15:18:20 +00:00
Bart Van Assche
571ec74b4e DRD: add two ppc output variants
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12311
2011-12-17 14:18:25 +00:00
Bart Van Assche
1351e4ccc9 DRD, load/store tracing: avoid evaluating the address expression twice
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12310
2011-12-17 12:59:45 +00:00
Bart Van Assche
630f8b2e62 Add a configure test for detecting whether gcc supports atomic operations on
64-bit integers on 32-bit platforms. Apparently newer gcc versions support
this but older versions not. Thanks to Philippe Waroquiers for reporting this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12309
2011-12-17 12:53:23 +00:00
Bart Van Assche
ce0fb977a7 DRD: Suppress uninteresting races triggered by the dynamic loader
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12308
2011-12-14 20:05:51 +00:00
Bart Van Assche
77fa5bdd2e drd/tests/Makefile.am: update EXTRA_DIST
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12307
2011-12-14 07:30:05 +00:00
Bart Van Assche
09bb951cba drd --trace-addr: make tracing 64-bit values on a 32-bit platform work
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12305
2011-12-13 11:12:05 +00:00
Bart Van Assche
5bf8c1dd8c DRD, --trace-addr: enable support for Ity_F32 and Ity_F64 / temporarily disable support for 64-bit CAS on 32-bit platforms
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12304
2011-12-13 08:53:23 +00:00
Bart Van Assche
80dda4d67f DRD: Eliminate a temporary variable
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12303
2011-12-13 08:05:07 +00:00
Bart Van Assche
423f1528c4 drd/tests/annotate_trace_memory*: add 32-bit output variants
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12302
2011-12-13 07:52:09 +00:00
Bart Van Assche
7194e38b85 drd/tests/pth_cleanup_handler: increase timeout
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12301
2011-12-13 07:49:30 +00:00
Bart Van Assche
bbc7e3587a DRD: rearrange the definition of u_widen_irop[][]
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12300
2011-12-12 19:54:32 +00:00
Bart Van Assche
f828c246a6 DRD: make the tracing regression test more complete
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12298
2011-12-12 19:37:10 +00:00
Bart Van Assche
552758fd18 DRD: Make the code for instrumenting store operations more robust
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12297
2011-12-12 19:18:26 +00:00
Bart Van Assche
ba63c7e3d6 drd.h: Add macro DRD_STOP_TRACE_VAR(). To do: update manual
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12296
2011-12-12 19:04:28 +00:00
Bart Van Assche
98a4b64227 DRD: make DRD_(stop_tracing_address_range)() work at an acceptable speed
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12295
2011-12-12 19:02:34 +00:00
Bart Van Assche
97947a4a20 DRD help text: remove a superfluous dot
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12294
2011-12-12 15:49:00 +00:00
Bart Van Assche
f7fb5bb661 Remove trailing whitespace
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12293
2011-12-11 20:34:03 +00:00
Bart Van Assche
7578df74d8 Disable drd/tests/std_thread until libstdc++ gets fixed (see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51504).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12292
2011-12-11 20:30:46 +00:00
Bart Van Assche
606de3587f DRD: Make --trace-addr work for atomic loads and stores. To do: update manual
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12291
2011-12-11 20:17:57 +00:00
Bart Van Assche
ffcd373429 DRD, --trace-addr: trace stored values too
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12290
2011-12-11 18:49:39 +00:00
Bart Van Assche
c885ce22ef DRD: Two non-functional changes: adjust source code indentation and fix
second argument of unsafeIRDirty_0_N() in the memory access tracing code.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12288
2011-12-11 17:54:17 +00:00
Bart Van Assche
b1c891d916 Follow-up for r12281: update regtest expected output
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12286
2011-12-11 10:18:27 +00:00
Bart Van Assche
aac70d3117 DRD: Add test program for std::thread.
To do: document _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE/AFTER in the DRD manual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12284
2011-12-10 19:42:05 +00:00
Bart Van Assche
908268e4a0 Add command-line option --fair-sched=[no|yes|try]. Use --fair-sched=try
when running the annotate_hbefore regression test. Closes #270006.

To do: update manual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12280
2011-12-08 16:14:59 +00:00
Bart Van Assche
12ec9d298a Remove emacs modeline and/or local variables from DRD source files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12279
2011-12-04 15:54:19 +00:00
Julian Seward
084b7cb10b Fix #284384 (clang 3.1 -Wunused-value warnings in valgrind.h,
memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR
into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value
of the former would be unused.  (Bart Van Assche, bart.vanassche@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12226
2011-10-24 13:21:57 +00:00
Bart Van Assche
feaf65b757 Remove the Qt4 regression tests because these are too hard to maintain
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12220
2011-10-23 15:21:48 +00:00