Commit Graph

91 Commits

Author SHA1 Message Date
Bart Van Assche
0cca640bd4 drd: Fix stack growth tracking. Hopefully this is the proper fix for #297147.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13316
2013-03-10 11:02:32 +00:00
Bart Van Assche
7b44c91302 drd: Fix a 4x slowdown for certain applications (#316181)
This commit reverts r12629 ("drd: Don't sporadically report false positives on
newly allocated memory. Fixes #297147").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13315
2013-03-10 10:43:11 +00:00
Florian Krohm
d0aa69c331 Fix more Char/HChar mixups. Closing in...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119
2012-11-10 22:29:54 +00:00
Florian Krohm
79b79d6388 First round of Char/HChar fixups for coregrind and memcheck.
Little bit of ripple in tools, too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13074
2012-10-21 19:43:43 +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
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
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
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
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
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
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
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
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
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
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
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
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
Bart Van Assche
6145f83cda Document command-line switches new in version 3.7.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12149
2011-10-13 18:51:47 +00:00
Bart Van Assche
45e4d0e7ee drd, XML tracing: move newline generation into DRD_(trace_msg)() / change tracing output format slightly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12146
2011-10-13 18:04:30 +00:00
Bart Van Assche
b7a5b789ef drd: Enable XML output. See also #282949. To do: document the output format.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12137
2011-10-11 19:08:39 +00:00
Bart Van Assche
9d1823dac9 DRD, refactoring: Introduce DRD_(trace_msg)()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12120
2011-10-08 08:29:29 +00:00
Bart Van Assche
6cf2bc2c34 drd: Delay deletion of memory access information of joined threads in order not
to miss any races caused by these threads.

To do: refine handling of pthread_once() again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11926
2011-07-28 09:54:37 +00:00
Bart Van Assche
e53eb1ec0c Updated modeline and copyright statement in DRD source files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11642
2011-03-13 12:02:44 +00:00
Bart Van Assche
40ece8a806 DRD: Report an error if --free-is-write=yes is used on a program invoking custom memory allocator client requests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11640
2011-03-13 09:08:10 +00:00
Bart Van Assche
84b87cf1e7 DRD: Restored --free-is-write support and fixed the bug that was present in the previous implementation. Still needs further testing though.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11636
2011-03-12 14:26:01 +00:00
Bart Van Assche
bf2479f28c DRD: Added command-line option --trace-hb for tracing ANNOTATE_HAPPENS_BEFORE()/AFTER().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11635
2011-03-12 14:07:09 +00:00
Bart Van Assche
1997767aad DRD: More source code cleanup (constant propagation).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11631
2011-03-12 12:34:44 +00:00
Julian Seward
452a8046df _pre_mem_asciiz handlers in both tools: don't segfault if passed an
obviously invalid address.  Fixes #255009.  Investigation & initial
patch by Philippe Waroquiers (philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11533
2011-02-09 12:47:23 +00:00
Bart Van Assche
fb1e012ed0 DRD: removed command-line option --free-is-write again since it is impossible
to implement this functionality reliably.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11522
2011-02-04 19:07:11 +00:00
Bart Van Assche
79f1b01520 DRD: do not assert() upon fork(). Fixes the DRD part of #255355.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11520
2011-02-03 17:47:50 +00:00
Bart Van Assche
9b2de38586 DRD: the help text does now indicate that lock contention detection is off by default / changed default value of the exclusive mutex threshold from 1000s to off. See also #255247.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11477
2010-10-25 18:18:54 +00:00
Bart Van Assche
ad86d78a6c E-mail address update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11420
2010-10-10 18:07:31 +00:00
Bart Van Assche
b558bd5888 Made sure that DRD processes empty address ranges without triggering an assertion failure. Added a unit test in drd/tests/unit_bitmap.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11346
2010-09-08 16:29:17 +00:00
Bart Van Assche
30e2d45d13 Made sure that DRD processes client programs that use SA_ONSTACK
correctly (e.g. Wine).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11329
2010-09-02 14:50:41 +00:00
Bart Van Assche
6d0bb4d96e Don't trigger an assertion failure if len == 0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11304
2010-08-29 15:30:16 +00:00
Bart Van Assche
d8a4b467a2 Source code cleanup.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11302
2010-08-29 09:51:06 +00:00
Bart Van Assche
a1d51679d9 Added command-line option --trace-alloc and disabled --free-is-write by default.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11301
2010-08-29 09:19:07 +00:00
Bart Van Assche
2af82819d8 Added new DRD command-line option --free-is-write and enabled it by default.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11299
2010-08-29 07:20:30 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Bart Van Assche
d0bb010178 Removed trailing whitespace in C source and header files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11052
2010-02-21 14:52:59 +00:00
Bart Van Assche
7d9922bc86 Removed the restriction that the size argument of drd_pre_mem_read_asciiz()
should be less than 4096 bytes. This function is called a.o. for the path
argument of the open() system call. This path can be longer than 4096 bytes.
Should fix bug #211941.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10905
2009-10-26 16:14:04 +00:00
Julian Seward
8ffe2fdefa Tidy up of messaging:
* For all tools and the core, don't show statistics when -v is in
  effect.  Instead, try to restrict -v to mostly user-useful
  stuff.

* A new flag --stats=no|yes [no] produces statistics output instead.

* Fix longstanding problem in that Memcheck's leak checker ran after
  the core's error manager module shut down, thereby not showing use
  counts of leak suppressions.  This fixes #186790.

* As a consequence, the leak checker text output of Memcheck has
  changed a bit -- leak check is done before the final error
  summary is done (much more logical), and the output has been
  tidied up a bit.

* Helgrind, Drd and Ptrcheck now also print "For counts of
  detected and suppressed errors, rerun with: -v", which makes
  them consistent with Memcheck in this regard.  These are
  filtered out by the regtest filter scripts.

For all tools except Memcheck, the regtests are unchanged.  On
Memcheck regtests still fail due to rearrangements of the leak
checker output.  This will be fixed by a followup commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10746
2009-08-07 15:46:56 +00:00
Nicholas Nethercote
8026c4766f Various option-related tweaks:
- Match the ordering of the non-tool-specific options in the usage message
  with the order in the user manual.  As a result, we now always print
  --alignment and --trace-malloc in the core's usage messages, which saves
  malloc-replacing tools from doing it themselves (and brings it in line
  with options that only apply to error-collecting tools).

- Improved the presentation of the Vex options with --help-debug.

- Removed documentation of -d in the manual because it's a debugging-only flag.

- Documented --read-var-info in the manual.  This fixes bug 201169.

- Renamed --auto-run-dsymutil as --dsymutil and documented it in the usage
  message.

- Fixed an XML error in manual-core-adv.xml.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10703
2009-08-04 02:32:55 +00:00
Julian Seward
d7ed7f6a13 (almost completely just function renaming):
* VG_(find_seginfo): incrementally rearrange the DebugInfo list, like
  most of the other list-searching functions do.

* rename all VG_(*seginfo*) functions exported from m_debuginfo to
  VG_(*DebugInfo*).  "seginfo" was a historical name which was mostly
  but not completely, done away with some time back.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10678
2009-07-31 09:41:29 +00:00
Bart Van Assche
f2a3a9901c DRD is no longer considered experimental on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10603
2009-07-25 14:03:53 +00:00