exp-ptrcheck asserting on threaded programs on x86 and amd64. Vast
amounts of fiddly complication that makes my head hurt. Urr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10418
addition of non-shadow IRTemps without causing it to collapse into
assertion failures. This changes is a simplified version of what was
committed in
svn://svn.valgrind.org/valgrind/branches/DCAS/memcheck/mc_translate.c
r10109.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10417
This fixes bug 136154.
Background:
The function stack - CLG_(current_fn_stack) - is a stack of
pointers to the fn_node structs of the currently active
functions. This stack is used for determining current context
from call chain to current function, and modified on entering
(via push_cxt) and leaving a function.
Entering a signal handler will push a 0 to the function stack
to make the context only dependend on the call chain inside of
the signal handler.
Thus, delivering two signals in a row should push two times a
0 value onto the function stack. However, the second 0-push was
incorrectly suppressed, leading to a failed assertion when
returning from the 2nd signal handler.
This also fixes a bug with incorrectly zeroing global cost
counters when changing the execution context, introduced with
r10386.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10399
code section which is marked as uninitialised.
This can happen if you have incremental linking enabled in Visual
Studio, which causes a .textbss section to be added before the real
text section. We were picking up that .textbss section and using it to
compute the avma and bias for the code which was giving completely the
wrong results.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10394
This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.
These changes track the IR changes added by vex r1901. They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392
verbose output is printed so that the tests would be ok, now that different
platforms have different alloc-fns lists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10389
This fixeds bug 150606.
When switching on instrumentation, the current function got the
wrong (too large) inclusive cost when instrumentation ever was on before.
The reason was that the global (ever increasing) event counters where
not reset on toggling instrumentation state. The global counters
are used to calculate inclusive cost of a function by getting the
difference of the global counters at leaving minus their value at
enter time. When leaving a function which was not encountered
to be entered before (a stack underrun of the shadow stack), it is
assumed that this function was entered with instrumentation switched
off. Then, the absolute value of global counters is used to calculate
the inclusive cost. Thus, these global counters have to be zeroed
at instrumentation change to allow for senseable inclusive costs
of functions which were not observed to be entered.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10386