Bart Van Assche [Mon, 16 Feb 2009 19:42:17 +0000 (19:42 +0000)]
Just as for the regression tests of other Valgrind tools, do not explicitly state that these are licensed under the GPLv2 license but leave this implicit.
Stack traces for Memcheck's syscall param errors are terribly unreliable, so
I changed it to just filter the entire stack trace out for these errors (both
normal and XML cases). The syscall name is still present in the error
string. This allows a one or more alternative expected output files to be
removed for several tests, which is A Very Good Thing.
Also, I killed filter_test_paths because it was weird and clumsy and the
above change obviated most of its use and the remaining effects could be
achieved in other ways.
Also, I fixed up the scalar* tests a little and they now pass on my machine,
(and hopefully at least some other machines) for the first time ever!
Bart Van Assche [Sun, 15 Feb 2009 10:40:44 +0000 (10:40 +0000)]
Restored the previous method for passing arguments from the creator thread to the created thread, since the new approach made some regression tests fail. It is not yet clear to me why.
Bart Van Assche [Sat, 14 Feb 2009 15:13:31 +0000 (15:13 +0000)]
- Moved several functions and variables from one source file to another.
- Created two new source files: drd_load_store.h and .c.
- Removed the header file drd_track.h.
Bart Van Assche [Sat, 14 Feb 2009 12:12:57 +0000 (12:12 +0000)]
- Performance improvement: eliminated busy waiting from thread creation.
- Applied DRD_() prefix to all names of functions that are not
intercepts of client code.
- Removed superfluous include directive, namely #include <inttypes.h>.
- Removed hack for suppressing false positive reports on stdio / stderr
because recently a suppression pattern was added for these races.
- Removed unused code and declarations.
- Added more comments.
- Updated copyright statement.
Filter out everything after "(below main)" in a line. This will help with
Darwin, for which such entries can occur within the executable, rather than
within libc.
Changed the way files are installed. Instead of going into
$INSTALL/<platform>/<filename>, they go to $INSTALL/<filename>-<platform>.
These filenames match those built in the build tree, and so simplifies the
build system signficantly and avoids the horrible sed renamings that were
previously required. This will also help greatly with the treatment of
.dSYM debug directories in the DARWIN branch.
Files affected include:
- preload libraries such as vgpreload_core-<platform>.so and
libmpiwrap-<platform>.so
- libraries such as libcoregrind_<platform>.a
- executables such as memcheck-<platform>
I updated the manual and added a note to the NEWS file about the change,
because it will affect a small number of users.
I did my best to update the AIX launcher/initimg correctly, but it hasn't
been tested.
Cleaned up the mess that was the treatment of "below main" functions such as
'__libc_start_main', in Massif, m_debuginfo and m_stacktrace. As part of
this, --show-below-main is now visible to tools, and Massif pays attention
to it.
Improved the description of --show-below-main=yes in the manual.
Replaced some instances of "__libc_start_main" in the test *.exp files with
"(below main)", which is what will actually be seen. Also updated
scalar.stderr.exp*, which should make it get closer to actually passing.
Fix a minor defect: only the first 14 chars of the 18 chars in the
--massif-out-file= option was being checked, which meant that if you did
--massif-out-filename=foo by mistake it would accept it and produce a file
called "ame=foo".
Bart Van Assche [Thu, 29 Jan 2009 09:57:22 +0000 (09:57 +0000)]
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).
Rechecking the diff of r9080 on the mailing list, I thought
I forgot to replace "|" with "+" in one spot. But that was part
of not-used code, so it actually does not matter.
So better get rid of this code part at all (no need to backport ;-).
Cachegrind/Callgrind: allow for cache sizes other than only powers of two
The number of sets, ie. number of cache lines divided by associativity,
and the cache line size still have to be powers of two.
This change is needed for default cache parameters used on some Intel
Core 2 and Atom processors.
Includes cachegrind manual update and explicit tests with 24KB D1/3MB L2
Reverts addition of 6MB warning to {cachegrind,callgrind}/tests/filter_stderr
Julian Seward [Mon, 26 Jan 2009 00:06:43 +0000 (00:06 +0000)]
Intercept and replace calls to calls to strnlen in glibc, for the
usual reasons. Also update an expected output (lines numbers in
h_intercepts.c should be removed by the regtest system, really).
Julian Seward [Sun, 25 Jan 2009 23:59:24 +0000 (23:59 +0000)]
Prior to this commit, exp-ptrcheck would assert if the DWARF3 data for
global or stack blocks described overlapping blocks (which are
nonsensical). Unfortunately it is naive to assume compilers will
always produce correct debug info. This commit makes exp-ptrcheck
much more robust against such (inevitable) anomalies: stack and global
blocks which overlap are simply ignored.
Julian Seward [Sun, 25 Jan 2009 23:50:32 +0000 (23:50 +0000)]
Handle a couple of artefacts produced by icc11: DW_TAG_reference_type
that doesn't have a size, and DW_FORM_ref_addr (assuming my
interpretation of the standard is correct.)
Julian Seward [Sat, 24 Jan 2009 00:07:53 +0000 (00:07 +0000)]
VG_(apply_StackTrace): following r8818, we should regard an entry of -1
as denoting the logical end of the stack. This change stops printing
of a lot of junk below the logical "-1" end mark. See added comments
for details.
Julian Seward [Sat, 24 Jan 2009 00:04:28 +0000 (00:04 +0000)]
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. icc9 appears to produce CUs with this anomaly. Not handling
the case causes the reader to lose sync at the start of the following
CU, since it hasn't skipped the junk bytes at the end of the current
CU, and it is basically hosed after that.
MERGE TO 3_4_BRANCH (?)
Move memcheck/tests/brk to the linux/ subdir, as it's Linux-specific (merged
from the DARWIN branch). Also filter the output more so the .stderr.exp2
isn't needed.
Merge some minor regtest updates from the DARWIN branch:
- avoid using <malloc.h> where it's not necessary, because on DARWIN it's
called <malloc/malloc.h>
- filter the output of brk2 more, which allows the .stderr.exp2 file to be
removed.
Julian Seward [Thu, 22 Jan 2009 22:44:30 +0000 (22:44 +0000)]
Move the test for __sync_bool_compare_and_swap almost to the bottom,
so it can use $mflag_primary. This makes the word size for which the
test is done (-m32 or -m64) be the same as for which it is actually
needed, and in some situations unbreaks building of the regtests in
32-bit mode on a 64-bit machine.
For the same reason, apply $mflag_primary to the test for OpenMP.
Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
#defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
in them.
- The ones that are in all-caps have a _CAPS suffix.
So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer. The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.
cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities. In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits. Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones. (This is partially merged from the DARWIN branch.)
configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.
valgrind.pc.in: try to make this more accurate. I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.
Julian Seward [Thu, 22 Jan 2009 21:18:15 +0000 (21:18 +0000)]
Minor tidyings:
search_all_symtabs: look for data symbols also in .sbss and .rodata
sections.
VG_(seginfo_sect_kind): identify addresses in .sbss sections.
VG_(pp_SectKind): handle missing case Vg_SectGOTPLT
search_all_loctabs, VG_(get_objname), VG_(find_seginfo): augment tests
"di->text_present" with "&& di->text_size > 0" (probably not
necessary, but is clearer, and more consistent in that most places
that look at DebugInfo.text_{size,avma} first perform both of those
tests).
Julian Seward [Thu, 22 Jan 2009 20:46:51 +0000 (20:46 +0000)]
Suppress any error at all that occurs in libpthread, without any
regard for any calling frames. Needed to hide the fact that we can't
see stdio locking stuff and hence end up reporting a lot of errors in
multithreaded stdio working.
MERGE TO 3_4_BRANCH.
Tom Hughes [Thu, 22 Jan 2009 13:24:06 +0000 (13:24 +0000)]
Improve detection of where ELF sections have been mapped by taking
the ELF segment table into account when deciding on the mapping
between SVMA and AVMA for a section.
This also allows the BSS kludge to be dropped, as the BSS address is
now correctly determined.