Commit Graph

282 Commits

Author SHA1 Message Date
Julian Seward
cce8a3ebd3 Implement pthread_yield.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@308
2002-05-22 13:17:31 +00:00
Julian Seward
a0c162928a ioctl TCXONC (Peter A Jonsson)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@307
2002-05-22 12:03:54 +00:00
Julian Seward
b519c0620d Fix one-char typo relating to detection of XFree86 3.X.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@306
2002-05-22 11:58:25 +00:00
Julian Seward
66a158a1f8 Implement x86 insn popl m32. (Nikolay Igotti )
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@305
2002-05-22 11:55:35 +00:00
Julian Seward
9bfa1f9da1 ---> 20020520
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@304
2002-05-21 00:54:02 +00:00
Julian Seward
8d2d128371 Don't mask libc's vfork / __vfork:
$ nm /lib/libc-2.2.4.so | grep vfork
   000b4220 T __vfork
   000b4220 W vfork

There's no __libc_vfork, so there's nothing we can do here.
Just don't supply our own version.

Not at all sure if this is correct.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@303
2002-05-21 00:51:21 +00:00
Julian Seward
8aae7441fe - Fix __NR_poll printing
- Invert the sense of IOC_READ / IOC_WRITE in generic ioctl handler
  (Simon Hausmann)
- TIOCSPGRP (Peter A Jonsson); also add a missing break in the ioctl stuff


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@302
2002-05-21 00:44:02 +00:00
Dirk Mueller
09e37e6f37 ignore some generated stuff
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@301
2002-05-21 00:10:05 +00:00
Dirk Mueller
8535adfeb1 fix gcc detection
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@300
2002-05-21 00:09:48 +00:00
Julian Seward
b5a4460dd1 gcc-3.1 compile fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@299
2002-05-21 00:05:10 +00:00
Julian Seward
2e94fafab4 Moan but don't die on unhandled stabs cases.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@298
2002-05-20 23:39:22 +00:00
Julian Seward
33c580dbf1 Improve diagnostic info printed by failures in
VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@297
2002-05-20 23:38:33 +00:00
Julian Seward
13cb5256f6 ---> 20020518
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@296
2002-05-19 00:14:09 +00:00
Julian Seward
53c56fd4d1 Implement semaphore functions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@295
2002-05-19 00:13:34 +00:00
Julian Seward
312f5a2c51 Add test from Lionel Ulmer showing incorrect behaviour of overloaded
new.  Not fixed yet.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@294
2002-05-18 19:54:36 +00:00
Julian Seward
0f11cb2547 Modify cachegrind.in to track recent changes in valgrind.in
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@293
2002-05-18 19:52:04 +00:00
Julian Seward
12f3df8548 Add getpmsg/putpmsg (Rick Watson)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@292
2002-05-18 13:24:24 +00:00
Julian Seward
96b04d4f30 Fix fork/exec stuff so it works again. We have to mangle LD_LIBRARY_PATH
as well as LD_PRELOAD, so as to make our libpthread.so go out of scope
when a child which we don't want to trace, is exec'd.  Otherwise the
child can wind up being connected to our libpthread.so but not to
valgrind.so, which is an unworkable combination; you have to be connected
to both or neither.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@291
2002-05-18 13:14:17 +00:00
Julian Seward
beefe2fffd The ELF table created by old kernels (2.4.3 ish) is different from
that created by newer 2.4 kernels.  Try and handle that.  (Untested).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@290
2002-05-18 11:55:05 +00:00
Julian Seward
e45ef9f6cc Add clarification of the purpose of the malloc/free mismatch checks
(Pascal Massimino)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@289
2002-05-18 11:09:19 +00:00
Julian Seward
a3f80dfc46 Add getitimer (Pascal Massimino)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@288
2002-05-18 11:01:06 +00:00
Julian Seward
2560fc9e47 Cancellation wrappers for pread/pwrite (Philip Martin).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@287
2002-05-18 10:56:27 +00:00
Julian Seward
32df450b77 Add a version dependency GLIBC_2.2.3 depends on GLIBC_2.2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@286
2002-05-18 10:51:25 +00:00
Julian Seward
a57b808f60 Cancellation wrapper for __pwrite64 (Adam Zell(?))
Be more paranoid in pthread_attr_setstacksize


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@285
2002-05-18 10:43:22 +00:00
Julian Seward
42a104b5d5 ---> 20020516
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@284
2002-05-16 23:42:39 +00:00
Julian Seward
a1b75f8383 Cancellation wrapper for pread64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@283
2002-05-16 23:39:10 +00:00
Julian Seward
4bc87a6ab3 Add a test for semaphore facilities: the Dining Philosophers, no less.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@282
2002-05-16 23:30:25 +00:00
Julian Seward
11ae12ffd7 stringMatch_wrk: reduce max recursion depth to 250 (paranoia)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@281
2002-05-16 23:16:13 +00:00
Julian Seward
b92b014633 Fix this for RH 7.3.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@280
2002-05-16 20:57:26 +00:00
Julian Seward
f3067ffa5d Minimal impl of pthread_attr_setstacksize.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@279
2002-05-16 20:51:15 +00:00
Julian Seward
9360e0621c Cancellation wrapper for sendmsg(), wierd wrapper for raise().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@278
2002-05-16 16:57:25 +00:00
Julian Seward
d53ff8366a Add some more recent tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@277
2002-05-16 11:18:05 +00:00
Julian Seward
6610ca19b3 Remove existing non-working support for self-modifying code, and instead
add a simple compromise, in which the client can notify valgrind
that certain code address ranges are invalid and should be retranslated.
This is done using the VALGRIND_DISCARD_TRANSLATIONS macro in valgrind.h.

At the same time take the opportunity to close the potentially fatal
loophole that translations for executable segments were not being
discarded when those segments were munmapped.  They are now.

Documentation updated.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@274
2002-05-16 11:06:21 +00:00
Julian Seward
962660eadd ---> 20020515
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@273
2002-05-15 22:26:37 +00:00
Julian Seward
930d862210 More new-signal-hacks fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@272
2002-05-15 22:25:47 +00:00
Julian Seward
30199fec47 In accordance with "build one to throw away, you will anyway (tm)",
throw away the old signals simulation and more or less start again
from scratch.  vg_signals.c is nearly a complete rewrite.  In fact
this is now the third generation of the signals simulation.

The purpose of this is to properly support signals in threads -- a
nightmare combination.  pthread_sigmask, pthread_kill and sigwait
are now alledged to work as POSIX requires.

In the process, throw away confusing and conceptually muddled old
implementation and replace with something which is more verbose but
conceptually cleaner, simpler and easier to argue is correct.

* When the client does sigaction/sigprocmask et al, the resulting
  changes are stored verbatim in SCSS -- the Static Client Signal State.
  So SCSS is the state the client believes the kernel is in.

* Every time SCSS changes, we recalculate the state the kernel
  *should* be in so that our signal simulation works.  This is the
  SKSS -- Static Kernel Signal State.  The kernel state is then
  updated accordingly.  By diffing the new and old SKSSs, the
  number of real system calls made is minimised.

* The dynamic state of the client's signals is stored in DCSS
  -- Dynamic Client Signal State.  This just records which signals
  are pending for which threads.

The big advantage of this scheme over the previous is that the SCSS ->
SKSS mapping is made explicit and gathered all in one place, rather
than spread out in a confusing way and done implicitly.  That makes it
all lot easier to decide if the mapping, which is really the heart of
the signals simulation, is correct or not.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@271
2002-05-15 21:13:39 +00:00
Nicholas Nethercote
ab8de9f4f7 Fix incredibly stupid bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@270
2002-05-15 14:30:55 +00:00
Nicholas Nethercote
8cbe9082c5 Expanded --sort option to take threshold args with the event names. Lets you
do things like "show functions covering 99% of all D2mr events *and* 99% of all
D2mw events" - before you could only choose the threshold for one.

Useful for me, but probably no-one else.  Still mentioned it in the docs,
though.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@269
2002-05-13 20:27:54 +00:00
Frédéric Gobry
460d2313d2 Use $(srcdir) to specify the location of the linker script
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@268
2002-05-13 07:50:45 +00:00
Julian Seward
c738e7407c Add another threads+signals test case along with the fix to make it work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@267
2002-05-13 00:38:52 +00:00
Julian Seward
0ba6f33e4f Add support for pthread_sigmask() and sigwait(). All absolutely
horrible, especially the latter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@266
2002-05-13 00:16:03 +00:00
Julian Seward
d6920d2b5c Fix spelling mistake: wierd*hacks --> weird*hacks
Also add a testcase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@265
2002-05-12 10:52:16 +00:00
Julian Seward
2943666eb5 In order to catch timeout events on fds which are readable and which
have been ioctl(TCSETA)'d with a VTIMEout, we appear to need to ask if
the fd is writable, for some reason.  Ask me not why.  Since this is
strange and potentially troublesome we only do it if the user asks
specially, by specifying --wierd-hacks=ioctl-VTIME.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@264
2002-05-12 03:00:17 +00:00
Julian Seward
79409e4eeb ---> 20020511
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@263
2002-05-10 23:21:25 +00:00
Julian Seward
9945834acc Hook libpthread.so's .init section to start up Valgrind too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@262
2002-05-10 23:20:58 +00:00
Julian Seward
0cb1ae9c86 Implement syslog() (Bill Nottingham)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@261
2002-05-10 22:58:14 +00:00
Julian Seward
77de734612 Even more shmctl fixings from Reuben.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@260
2002-05-10 22:51:26 +00:00
Julian Seward
46111c06e3 Kernel 2.4 / glibc 2.2.X build fixes for recent startup changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@259
2002-05-10 22:31:40 +00:00
Julian Seward
06e9ee22df New and hopefully more reliable method for finding argc/argv/envp at
startup, by looking for the ELF frame created on the process' stack
at startup.  This avoids having to deal with problems caused by glibc
magic offsets.

WARNING: only works for 2.2 kernels right now.  2.4 is broken.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@258
2002-05-10 21:07:22 +00:00
Julian Seward
67b0b0e404 Modify the startup mechanism so that any call into valgrind's libpthread.so
will start up valgrind if it is not already running.  This more or less
sidesteps the problem that sometimes valgrind.so isn't init'd first by
the dynamic linker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@257
2002-05-10 21:03:56 +00:00