Julian Seward [Mon, 1 Jan 2007 22:07:58 +0000 (22:07 +0000)]
Avoid printf in the recursive routines, so that the intercept of
mempcpy which is called from printf does not mess up the
carefully-balanced call-stack overflow checks that this test does on
ppc64-linux.
Julian Seward [Sun, 31 Dec 2006 00:22:30 +0000 (00:22 +0000)]
Intercept/replace glibc-2.5's __strcpy_chk function for the usual
reasons: it reads word-sized chunks from memory and so produces lots
of errors in SuSE 10.2 (amd64).
Julian Seward [Thu, 28 Dec 2006 20:26:08 +0000 (20:26 +0000)]
Get rid of the core-tool events pre_mutex_lock, post_mutex_lock and
post_mutex_unlock. The core can't detect them anyway any more, so
there's no point in having them.
Callgrind: Throttle calls CLG_(run_thread) after r6413
After the change in r6413, CLG_(run_thread) is called a
lot more often, increasing the polling overhead to check
for a callgrind command file (created by callgrind_control
for controlling a callgrind run in an interactive way).
This reduces the calls to only be done every 5000 BBs,
which gives a similar polling frequency as before.
Julian Seward [Sat, 23 Dec 2006 01:21:12 +0000 (01:21 +0000)]
Change the core-tool interface 'thread_run' event to be more useful:
- Rename the event to 'thread_runstate'.
- Add arguments: pass also a boolean indicating whether the thread
is running or stopping, and a 64-bit int showing how many blocks
overall have run, so tools can make a rough estimate of workload.
The boolean allows tools to see threads starting and stopping.
Prior to this, de-schedule events were invisible to tools.
- Call the callback (hand the event to tools) just before client
code is run, and again immediately after it stops running. This
should give correct sequencing w.r.t posting of thread creation/
destruction events.
In order to make callgrind work without complex changes, I added a
simple impedance-matching function 'clg_thread_runstate_callback'
which hands thread-run events onwards to CLG_(thread_run).
Use this new 'thread_runstate' with care: it will be called before
and after every translation, which means it will be called ~500k
times in a startup of firefox. So the callback needs to be fast.
Julian Seward [Sun, 17 Dec 2006 18:58:55 +0000 (18:58 +0000)]
A naming-only change: rename VG_(set_running) to VG_(acquire_BigLock)
and VG_(set_sleeping) to VG_(release_BigLock). And some other minor
renamings to the thread locking stuff, to make it easier to follow.
Julian Seward [Sat, 16 Dec 2006 14:25:04 +0000 (14:25 +0000)]
64-bit followup to r6404: fix and simplify the inline assembly, so it
works right when compiled by gcc-4.1.0. Also add a new flag, -A, to
test all available instructions.
Completely overhauled the internals of Memcheck's error handling. All the
different error kinds were reusing the same struct for storing their
details. Each one used some but not all the fields, and the AddrInfo was
similar, and it was very confusing.
So I changed MC_Error and AddrInfo to be tagged unions, like Vex's IRExpr and
IRStmt types. The resulting code is a little more verbose but much easier
to understand. I also split up several error kinds, which also made things
simpler. The user-visible behaviour is identical except for a couple of
very minor things that I've documented in the NEWS file for the 3.3.0
release.
Ideally I'd get rid of the Addr and Char* fields in the core Error type,
which are not always used, and do them similarly within tools. But that
would require changing the core/tool interface, so I'm leaving it for the
moment.
Dirk Mueller [Thu, 7 Dec 2006 15:31:57 +0000 (15:31 +0000)]
rename as _SOURCES is a reserved keywoard and breaks with newer
auto*foo:
Makefile.am:110: variable `VEX_PRIMARY_SOURCES' is defined but no
program or
Makefile.am:110: library has `VEX_PRIMARY' as canonic name (possible
typo)
Julian Seward [Wed, 6 Dec 2006 18:05:54 +0000 (18:05 +0000)]
Fix confusing and contradictory "Rerun with ..." messages printed at
the end of MC_(do_detect_memory_leaks). This causes various leak
regression tests to fail; will fix shortly.
Julian Seward [Wed, 6 Dec 2006 03:35:38 +0000 (03:35 +0000)]
When generating suppressions, remember to Z-demangle function names,
since the suppression-matching machinery does the same. Not doing so
causes auto-generated suppressions involving Z-mangled fn names to not
work.
Julian Seward [Tue, 28 Nov 2006 00:15:35 +0000 (00:15 +0000)]
Make it possible to suppress, and auto-generate suppressions for,
"User" errors; that is, errors resulting from client requests (check
memory range is addressible / defined).
Julian Seward [Fri, 24 Nov 2006 15:18:15 +0000 (15:18 +0000)]
- remove some 'inline' directives so as to make stack backtraces
involving this library easier to make sense of
- try to handle 'long double' better. The problem is that the
library needs to know how many bytes are written when a 'long double'
is stored, which is sometimes not the same as what sizeof(long double)
says.
Julian Seward [Fri, 17 Nov 2006 20:00:57 +0000 (20:00 +0000)]
Redo the interface to m_initimg (module for setting up the initial
client image) so it's less of an incomprehensible mess. Basically the
idea is to have two standard functions, VG_(ii_create_image) and
VG_(ii_finalise_image), which communicate using the structure types
IICreateImageInfo and IIFinaliseImageInfo. The types hold various
OS-specific bits of info. A nice side effect is that m_main is tidied
up somewhat.
Julian Seward [Thu, 16 Nov 2006 12:21:52 +0000 (12:21 +0000)]
CFI reader: when decoding the single (address) argument to
DW_CFA_set_loc, take into account any encoding info conveyed by the
augmentation string. See big comment in the code.