14 Commits

Author SHA1 Message Date
Julian Seward
46e09a22f6 Minor mods to stop make the leak detector behave properly for the
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
2002-06-05 20:28:33 +00:00
Julian Seward
5bf4e3319d Remove valgrind's use of libc-supplied stat() and sbrk(). Now the only
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
2002-05-09 17:38:13 +00:00
Julian Seward
b9c76f1080 Actually call VG_(first_and_last_secondaries_look_plausible) and make
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
2002-05-07 23:45:03 +00:00
Julian Seward
6a3788061f Generate better ucode for back-to-back sequences of register pushes and
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
2002-05-07 23:38:30 +00:00
Julian Seward
3cc89028c1 Fix really stupid use of uninitialised value introduced in rev 1.8.
Basically this bug invalidates all snapshots from 0501 until now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@212
2002-05-04 12:59:03 +00:00
Julian Seward
78998c4d1a Ensure that values returned to the client from pthread operations are
marked as defined, so as to avoid spurious uninit-value errors.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@185
2002-05-01 03:24:23 +00:00
Julian Seward
cd4b1c10a2 Reinstate use of VG_(do_sanity_checks), although at a lower frequency
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
2002-05-01 01:58:35 +00:00
Julian Seward
f6f515f0b8 Yay! Opera (6.0TP2) now works.
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
2002-04-18 11:37:52 +00:00
Julian Seward
93b2c2ed95 Get rid of the muraroa.demon.co.uk references since that account is
soon to disappear.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@83
2002-04-16 02:51:05 +00:00
Julian Seward
6885b33e91 * external namespace check
* VG_(printf) format strings check


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@65
2002-04-14 13:01:38 +00:00
Julian Seward
8138f264e0 Plumb the right %EIP and %EBP values through to VG_(get_ExeContext)
now that we have the additional complication of multiple threads.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@64
2002-04-14 04:16:48 +00:00
Julian Seward
7a36f60133 Mega-merge of my last 2 weeks hacking. This basically does the groundwork
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
2002-04-12 11:12:52 +00:00
Julian Seward
6b710076fa Print suggested fix to avoid this panic:
VG_ASSUMED_EXE_BASE doesn't match reality


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@23
2002-03-24 12:03:00 +00:00
Julian Seward
72a784f3b1 Initial revision
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2
2002-03-22 01:27:54 +00:00