Don't trust the result reported by pkg-config about QtCore, but try whether linking succeeds. This additional test is necessary when running configure with the flag --enable-only32bit.
Made test for compiler atomic builtins more strict, such that drd/tests/atomic_var.c doesn't trigger bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34115 in a.o. gcc 4.3.1 when Valgrind is configured with --enable-only32bit.
Fix longstanding bug in dual-arch support, which originated in
memcheck/tests/Makefile.am and was copied into drd/tests/Makefile.am.
When building regtests for a 32-bit only build on a 64-bit CPU, the
use of $(VG_ARCH) in these Makefiles is incorrect, because VG_ARCH
will be set to the 64-bit architecture, not the 32-bit architecture.
See comments on VG_ARCH_PRI and VG_ARCH_MAX in configure.in for more
details.
Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.
The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.
- Added support for the variable ABT_JOBS, number of jobs to run in parallel.
- Added support for the variable ABT_RUN_REGTEST, the command to run the regression tests.
- Added support for the variable ABT_CONFIGURE_OPTIONS, such that extra command line options
can be passed to the configure script.
- Cross-compilation patch is applied after source code checkout and before the source code is
compiled.
Julian Seward [Fri, 22 Aug 2008 23:18:02 +0000 (23:18 +0000)]
Rework storage management in the Dwarf3 type and variable reader, to
try and reduce its space consumption. This change changes some long
linked lists into XArrays instead.
Julian Seward [Wed, 20 Aug 2008 08:14:07 +0000 (08:14 +0000)]
Make the absolute bare minimum changes needed to stop the Dwarf3
variable & type reader dying on gcc-4.3.x produced Dwarf3. This is
done by handling DW_TAG_class_type and treating it the same as
DW_TAG_structure_type. I don't know if this is really correct or not.
This reader is still grossly inefficient in terms of space use, and
could be majorly improved, by storing information in arrays rather
than in linked lists with (sometimes) more than 5 million elements.
But this will have to wait.
Julian Seward [Tue, 19 Aug 2008 08:38:52 +0000 (08:38 +0000)]
Move the WordFM (AVL trees of UWord-pairs) implementation from
helgrind/ into the core. It's just too darn useful to not be in the
core. There is some overlap in functionality between OSet and WordFM,
but OSet is more space efficient in some circumstances, whereas WordFM
is easier to use and a bit more flexible in some cases.
Also in this new module (m_wordfm) is a type WordBag, build on top of
WordFM. This provides Multiset of UWords functionality.
Julian Seward [Tue, 19 Aug 2008 07:03:04 +0000 (07:03 +0000)]
Presently, Valgrind (non-client) code that wants to use the stat
family of syscalls is impossible to write in a way that's portable and
correct. On some targets (eg x86-linux) you need to do sys_stat64 and
receive the results in a 'struct vki_stat64'. But on other targets
(eg amd64-linux) neither sys_stat64 nor 'struct vki_stat64' exist.
This commit adds a new type, 'struct vg_stat', which contains 64 bit
fields in all the right places, and makes VG_(stat) and VG_(fstat) use
it. This means callers to the two functions no longer need to worry
about the is-it-64-bit-clean-or-not question, since these routines
reformat the received data into a'struct vg_stat'. Kind of like what
glibc must have been doing for decades.
This (indirectly) fixes a bug on x86-linux, in which m_debuginfo would
sometimes fail to read debug info, due to VG_(di_notify_mmap) using
VG_(stat) (hence sys_stat) on the file, which failed, and when in fact
it should have used sys_stat64. Bug reported and tracked down by
Marc-Oliver Straub.
Julian Seward [Mon, 18 Aug 2008 21:47:11 +0000 (21:47 +0000)]
The address space manager, and in particular the NSegment type,
hardwire the assumption that an inode number is a UWord, that is, a
host word. There's no reason for that assumption to be valid; an
inode number could be a 64-bit int even on a 32 bit platform (eg w.r.t
sys_stat64). This commit changes inode numbers and, for good measure,
dev numbers, to be 64-bit regardless.
Temporarily comment out a couple of XML fragments which cause the .pdf
generation (make print-docs), and hence make dist, to fail for
completely non-obvious reasons, even though xsltproc (make html-docs)
does not complain about them.
Change memcheck's (client) realloc implementation so that it copies
and moves the block even when the new size is smaller or the same.
This increases the chance that it can detect buggy code which assumes
that realloc-smaller doesn't cause the block to move.
Origin-tracking fix: make sure that we have a shadow-origin (B)
temporary defined for every (original) temp used in the block's IR
preamble, as is already done of the shadow-definedness (V)
temporaries. Otherwise we can end up generating references to B
temporaries that have no assigned value, which causes the IR sanity
checker to complain. Only observed (and even then rarely) on the
complex preambles sometimes used for TOC-afflicted platforms.
Temporarily disable Qt4-related tests, as they don't build on systems
with qt-4.2.1 at least. It appears the type of QMutex::tryLock has
changed somewhere after qt-4.2.1.
Added -m32 flag, such that the SPLASH-2 benchmarks are compiled in 32-bit mode (these benchmarks were not designed to be compiled in 64-bit mode -- radiosity deadlocks when compiled in 64-bit mode). Suppressed harmless data races in the radiosity benchmark.
Changed benchmark input parameters such that these are now identical to the parameters used in the paper "Accurate and Efficient Filtering for the Intel Thread Checker Race Detector", Paul Sack et al, 2006.
Changed minimum time measurement error from 0.00 to 0.01. Command line arguments are now saved to the output file. And the output of all three runs is now present in the output file, not only the output of the last run.