following kind of stupid test program
int main (void) { char* a = malloc(100); return 0; }
which many people seem fond of trying for some reason.
In general the leak detector works fine.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@387
sysbols we need from libc are __umoddi3 and __udivdi3 ; other than that
valgrind.so is completely self-contained.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@244
assertions about the return value, rather than asserting the
non-NULL-ness of the function's address :) Classic beginner's mistake,
compounded by C's crappy (non-existent) type system, which allows me
to silently confuse Bool with Pointer-to-Function. What a great
programming language. Come back Haskell, all is forgiven.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@228
pops, as appear at function prologues/epilogues. Specifically, update %ESP
just once for the whole sequence. This reduces by about 20% the number
of calls to handle_esp_assignment (for kate in KDE 3.0, -O), which is a
good thing since that is quite expensive.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@227
than before. Turns out they were wasting 25-50% of total execution
time in valgrinds of the 200203XX vintage. Apologies, KDE hackers!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@182
Various enhancements:
* Make the error message system more thread-aware.
* Fix stupid bug in do_pthread_create causing incorrect initial
%ESP values sometimes.
* Fix various other minor things needed to make opera work.
Performance of threaded apps is pretty terrible. This needs
looking into.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@98
for pthread_* support. Major changes:
* Valgrind now contains a (skeletal!) user-space pthreads
implementation. The exciting bits are in new file vg_scheduler.c.
This contains thread management and scheduling, including nasty crud
to do with making some syscalls (read,write,nanosleep) nonblocking.
Also implementation of pthread_ functions: create join
mutex_{create,destroy,lock,unlock} and cancel.
* As a side effect of the above, major improvements to signal handling
and to the client-request machinery. This is now used to intercept
malloc/free etc too; the hacky way this is done before is gone.
Another side effect is that vg_dispatch.S is greatly simplified.
Also, the horrible hacks to do with delivering signals to threads
blocked in syscalls are gone, since the new mechanisms cover this case
easily.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@52