Julian Seward [Sat, 31 Jan 2009 15:02:07 +0000 (15:02 +0000)]
Merge from the trunk, some Drd-related changes:
9087 Suppress any error whose top frame is in libc.so. While not very
elegant, this is an effective way to suppress data race reports
triggered by glibc's stdio functions (which uses inlined locking
functions).
9090 Do not only recognize .plt and .plt.got sections inside the
mapped address range, but also outside the mapped address range
(necessary for ppc).
9091 Generalized suppression patterns.
9092 Removed mandatory redirections for DRD since these made DRD
impossible to use on openSUSE 10.3 ppc.
Julian Seward [Thu, 29 Jan 2009 10:14:53 +0000 (10:14 +0000)]
Merge in non-power-of-2-sized cache simulation fixes for Callgrind
and Cachegrind:
8912 callgrind/tests/filter_stderr
cachegrind/tests/filter_stderr
Filter out an additional warning, so the tests pass on
machines with a 6MB L2 cache.
cachegrind/cg-x86.c
cachegrind/cg-amd64.c
These two files were almost identical. cg-amd64.c now just
#includes cg-x86.c.
9080 Cachegrind/Callgrind: allow for cache sizes other than only
powers of two
Julian Seward [Mon, 26 Jan 2009 15:45:59 +0000 (15:45 +0000)]
Merge from the trunk, a bunch of improvements for exp-ptrcheck:
8908 Add some more system calls to ptrcheck.
9027 Ptrcheck: More aggressive suppression of error reports from ld.so.
9056 Handle a few more syscalls, as per #179618.
9059 Prior to this commit, exp-ptrcheck would assert if the DWARF3
data for global or stack blocks described overlapping blocks
9060 Intercept and replace calls to calls to strnlen in glibc, for the
usual reasons.
9061 Minor refinements:
* h_main.c: handle a few more syscalls
* exp-ptrcheck.supp: ignore errors in glibc's getenv
-- is highly optimised
* pc_common.c: fix small error in error message printing
9062 Remove function that was made redundant by r9059.
Julian Seward [Mon, 26 Jan 2009 14:53:38 +0000 (14:53 +0000)]
merge r9049:
Handle the case where a Compilation Unit (CU) (or, really, the CU
and its associated DIEs) occupies less space than stated in the
CU's header.
Julian Seward [Mon, 26 Jan 2009 13:02:16 +0000 (13:02 +0000)]
Merge from the trunk, a bunch of changes to fix ELF segment mapping
and bias computation problems:
9020 Improve detection of where ELF sections have been mapped
9021 Don't assume that all global variables are in the data section
9022 Removed unused round_Addr_upwards function.
9024 Handle the rodata and sbss sections
9025 Accept zero size text segments.
9026 Don't worry about an unmapped, zero sized, bss segment.
9053 Fix aix5 build breakage following r9021.
Julian Seward [Fri, 2 Jan 2009 23:17:02 +0000 (23:17 +0000)]
Suppress all races whose top frame is in libc.so. This is a not very
clever interim solution to the problem of Helgrind reporting lots of
false races in glibc's stdio functions, due to it not seeing the
relevant (inlined, alas) locking that glibc uses.
Tom Hughes [Fri, 2 Jan 2009 11:07:18 +0000 (11:07 +0000)]
Add some more Intel cache configuration values needed for Atom
processors. These come from sandpile.org as the current version
of Intel's Application Note 485 doesn't have them yet.
Julian Seward [Tue, 23 Dec 2008 20:00:23 +0000 (20:00 +0000)]
ML_(addDiCfSI)(): truncate DiCfSI's that fall partially but not
entirely inside the r-x mapped area, so that they fall entirely
within the mapped area. This is necessary in order to avoid
assertion failures later in check_CFSI_related_invariants().
Julian Seward [Sun, 21 Dec 2008 10:44:28 +0000 (10:44 +0000)]
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
Julian Seward [Sun, 21 Dec 2008 10:43:10 +0000 (10:43 +0000)]
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.
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.
Julian Seward [Sat, 13 Dec 2008 01:20:21 +0000 (01:20 +0000)]
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).
Julian Seward [Fri, 12 Dec 2008 13:23:03 +0000 (13:23 +0000)]
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.