Commit Graph

752 Commits

Author SHA1 Message Date
Florian Krohm
7d59048401 This is the 2nd installment of the cache info reorganisation.
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031
2012-10-07 21:59:42 +00:00
Bart Van Assche
2f907e6480 drd: Suppress race reports on .got sections too
This is a slightly modified version of a patch provided by Petar Jovanovic
<petar.jovanovic@rt-rk.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12960
2012-09-06 14:08:26 +00:00
Bart Van Assche
b7ff000e27 drd/tests: Add a test that verifies whether the pthread_cancel() intercept works
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12908
2012-08-28 18:17:27 +00:00
Bart Van Assche
7f409138b2 drd: Re-enable the pthread_cancel() intercept now that the CALL_FN_*() ABI
violation has been fixed (r12811).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12907
2012-08-28 17:57:09 +00:00
Bart Van Assche
342cac3d59 drd: Correct semaphore tracing in case sem_*wait() did not wait. See also #305690.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12898
2012-08-25 07:25:00 +00:00
Bart Van Assche
023e92dc22 drd: Handle non-zero sem_*wait() return values correctly. Fixes #305690.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12897
2012-08-24 17:59:03 +00:00
Bart Van Assche
04a00aa879 drd/tests: Add test program that makes sem_trywait() return a non-zero value
(provided by Graham Whitted <7wz69ejteg@snkmail.com> - see also #305690).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12896
2012-08-24 17:57:44 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Bart Van Assche
6c92e97588 drd: Avoid that invoking pthread_cancel() from a program analyzed with DRD triggers a crash on Fedora 17
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12800
2012-07-28 14:35:48 +00:00
Bart Van Assche
24d9acaac7 drd: Revert r12651 because it didn't change drd's behavior on any platform
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12799
2012-07-28 14:32:03 +00:00
Bart Van Assche
2a476a846f drd/tests/filter_stderr: Remove a space and two backslashes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12713
2012-07-05 16:21:49 +00:00
Bart Van Assche
adcdb6b0fb drd/tests/tc04_free_lock: Use drd/tests/filter_stderr
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12708
2012-07-04 10:43:12 +00:00
Bart Van Assche
1a2d5e0c03 drd/tests: Make the expected output match the actual output
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12702
2012-07-03 07:53:34 +00:00
Bart Van Assche
0eec2595ca drd/tests: Follow-up for r12690
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12700
2012-07-02 18:47:44 +00:00
Bart Van Assche
8b1be3d95c drd/tests: Rework r12662 as suggested by Florian Krohm
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12690
2012-06-30 18:00:08 +00:00
Bart Van Assche
9d97e3e6c7 drd: Add yet another expected output file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12662
2012-06-23 10:15:17 +00:00
Bart Van Assche
7d201ff42b drd: Make sure that frame unwind information is generated for DRD intercepts
such that pthread_cancel() works properly. See also Ulrich Drepper, Cancellation
and C++ Exceptions, 2010 (http://udrepper.livejournal.com/21541.html).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12651
2012-06-17 08:46:32 +00:00
Bart Van Assche
0804b19b44 drd: Add two regression test output files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12650
2012-06-17 06:13:58 +00:00
Bart Van Assche
0a1c05242b drd manual: Update according to post-3.7.0 changes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12645
2012-06-16 18:51:16 +00:00
Bart Van Assche
051e39f840 drd: Don't sporadically report false positives on newly allocated memory. Fixes #297147.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12629
2012-06-10 10:44:05 +00:00
Julian Seward
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Julian Seward
f069a7bb56 Merge branches/TCHAIN from r12476 (its creation point) into trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12517
2012-04-20 23:58:55 +00:00
Julian Seward
8b6f93641c Add translation chaining support for amd64, x86 and ARM
(Valgrind side).  See #296422.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12484
2012-04-02 21:56:03 +00:00
Bart Van Assche
4d684ffc0d drd, realloc() intercept: Swap freeing and cleaning memory.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12482
2012-04-02 15:46:51 +00:00
Bart Van Assche
7a443761bc drd, free() intercept: Swap freeing and cleaning memory.
Note: since the big lock is held while the malloc() and free() intercepts are
running, and since mmap() is treated by Valgrind as a non-blocking system call,
this code change is not expected to result in a behavior change of drd.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12478
2012-04-02 14:36:22 +00:00
Bart Van Assche
f244dcefb6 drd: Reenable reporting races on stack variables that are shared over threads for --check-stack-var=yes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12475
2012-04-01 15:06:57 +00:00
Bart Van Assche
8e19567a85 drd: Don't complain about stack variables that are shared over threads. Closes #297147
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12474
2012-04-01 14:40:16 +00:00
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