]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
23 years agoA simple script to help me ensure that my libpthread.so looks
Julian Seward [Fri, 26 Apr 2002 11:50:43 +0000 (11:50 +0000)] 
A simple script to help me ensure that my libpthread.so looks
from the outside, to the linker, identical to the original.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@152

23 years agoFix many holes and bugs in an attempt to get my libpthread.so to export
Julian Seward [Fri, 26 Apr 2002 03:28:18 +0000 (03:28 +0000)] 
Fix many holes and bugs in an attempt to get my libpthread.so to export
the same set of symbols as the real one, which I now realise is crucial
for it to work at all.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@151

23 years agoFix various bugs getting in the way of licq starting up.
Julian Seward [Fri, 26 Apr 2002 00:27:53 +0000 (00:27 +0000)] 
Fix various bugs getting in the way of licq starting up.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@150

23 years agoTry and give at least some minimal binding for all functions exported
Julian Seward [Thu, 25 Apr 2002 20:17:29 +0000 (20:17 +0000)] 
Try and give at least some minimal binding for all functions exported
by the real libpthread.so.  In the process fix a bunch of stuff, including
adding thread-specific h_errno and resolver state storage.  This fixes
licq crashing at startup.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@149

23 years agoJiggle timing delays yet again.
Julian Seward [Thu, 25 Apr 2002 01:33:50 +0000 (01:33 +0000)] 
Jiggle timing delays yet again.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@148

23 years ago* Performance enhancements: put syscalls and pthread_getspecific in
Julian Seward [Thu, 25 Apr 2002 01:32:10 +0000 (01:32 +0000)] 
* Performance enhancements: put syscalls and pthread_getspecific in
  fast path.

* Jiggle timing intervals yet again, probably completely pointless.

* Teach the scheduler that a thread in cond_timedwait is in a bounded
  wait.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@147

23 years agoDefine VKI_SIGUSR1.
Julian Seward [Thu, 25 Apr 2002 01:29:35 +0000 (01:29 +0000)] 
Define VKI_SIGUSR1.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@146

23 years agoDebugging hook which turns on a lot of debug printing when SIGUSR1
Julian Seward [Thu, 25 Apr 2002 01:27:35 +0000 (01:27 +0000)] 
Debugging hook which turns on a lot of debug printing when SIGUSR1
arrives.  Commented out.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@145

23 years ago---> 20020425
Julian Seward [Thu, 25 Apr 2002 01:24:42 +0000 (01:24 +0000)] 
---> 20020425

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@144

23 years agoBack out rev 1.10. It can't possibly be the right fix.
Julian Seward [Wed, 24 Apr 2002 21:44:17 +0000 (21:44 +0000)] 
Back out rev 1.10.  It can't possibly be the right fix.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@143

23 years agoVG_(oursignalhandler): when catching a fatal signal, don't longjmp
Julian Seward [Wed, 24 Apr 2002 21:39:11 +0000 (21:39 +0000)] 
VG_(oursignalhandler): when catching a fatal signal, don't longjmp
back to the scheduler if the signal is already pending.  There's
something very suspicious about all this, though.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@142

23 years agoGet rid of incomprehensible special-case treatment of SIGABRT.
Julian Seward [Wed, 24 Apr 2002 21:25:46 +0000 (21:25 +0000)] 
Get rid of incomprehensible special-case treatment of SIGABRT.
Might have made sense once but it doesn't any more.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@141

23 years agoadjust error count thresholds
Julian Seward [Wed, 24 Apr 2002 21:24:18 +0000 (21:24 +0000)] 
adjust error count thresholds

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@140

23 years agoVG_(maybe_add_context): also stop collecting errors when the total
Julian Seward [Wed, 24 Apr 2002 21:03:47 +0000 (21:03 +0000)] 
VG_(maybe_add_context): also stop collecting errors when the total
number (in contrast to the total number of _different_) of them
gets too high.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@139

23 years agoVG_(malloc_aligned): accept req_alignB == 4.
Julian Seward [Wed, 24 Apr 2002 20:32:50 +0000 (20:32 +0000)] 
VG_(malloc_aligned): accept req_alignB == 4.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@138

23 years agoWrappers for open64/lseek64.
Julian Seward [Wed, 24 Apr 2002 20:29:58 +0000 (20:29 +0000)] 
Wrappers for open64/lseek64.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@137

23 years agoOnce VG_(maybe_add_context) starts ignoring errors, ignore them
Julian Seward [Wed, 24 Apr 2002 20:20:22 +0000 (20:20 +0000)] 
Once VG_(maybe_add_context) starts ignoring errors, ignore them
right up front, in the VG_(record_*_error) functions.  This is an
attempt to avoid excessive performance problems with programs which
have excessive numbers of errors.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@136

23 years ago- Fast-track pthread_mutex_trylock(), even though programs which use
Julian Seward [Wed, 24 Apr 2002 19:51:31 +0000 (19:51 +0000)] 
- Fast-track pthread_mutex_trylock(), even though programs which use
  it extensively are probably badly designed -- they are polling.

- VG_(deliver_signals): return a Bool indicating if any signals
  really were delivered.  Used only to try and reduce excessive
  frequency of system sanity checks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@135

23 years agoAdd wait() wrapper.
Julian Seward [Wed, 24 Apr 2002 19:26:47 +0000 (19:26 +0000)] 
Add wait() wrapper.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@134

23 years agoAdd a very simple test for pthread_once().
Julian Seward [Wed, 24 Apr 2002 19:23:50 +0000 (19:23 +0000)] 
Add a very simple test for pthread_once().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@133

23 years agoAdd a simplistic implementation of pthread_once().
Julian Seward [Wed, 24 Apr 2002 19:21:39 +0000 (19:21 +0000)] 
Add a simplistic implementation of pthread_once().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@132

23 years agoAllow more slack with VG_STARTUP_STACK_MASK. Also increase some
Julian Seward [Wed, 24 Apr 2002 14:44:23 +0000 (14:44 +0000)] 
Allow more slack with VG_STARTUP_STACK_MASK.  Also increase some
table sizes, for Galeon.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@131

23 years agoAdd wrapper for system().
Julian Seward [Wed, 24 Apr 2002 13:28:15 +0000 (13:28 +0000)] 
Add wrapper for system().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@130

23 years agoAdd test for stupid malloc etc args.
Julian Seward [Wed, 24 Apr 2002 11:44:27 +0000 (11:44 +0000)] 
Add test for stupid malloc etc args.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@129

23 years agoDetect, print warning, and "correctly" handle implausible requests
Julian Seward [Wed, 24 Apr 2002 11:37:37 +0000 (11:37 +0000)] 
Detect, print warning, and "correctly" handle implausible requests
such as malloc(negative-argument).  You'd be amazed at the stupidity
of some of the programs people run on valgrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@128

23 years ago- Use CFLAGS in demangle/Makefile.am
Julian Seward [Wed, 24 Apr 2002 11:14:22 +0000 (11:14 +0000)] 
- Use CFLAGS in demangle/Makefile.am
- Get rid of -Werror; it breaks to many people's builds.  It can be
  passed in with make variable WERROR if needed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@127

23 years ago--> 20020424.
Julian Seward [Wed, 24 Apr 2002 02:32:30 +0000 (02:32 +0000)] 
--> 20020424.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@126

23 years agoAdd wrapper for sendto().
Julian Seward [Wed, 24 Apr 2002 02:28:34 +0000 (02:28 +0000)] 
Add wrapper for sendto().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@125

23 years agoAdd __NR_madvise.
Julian Seward [Wed, 24 Apr 2002 02:24:44 +0000 (02:24 +0000)] 
Add __NR_madvise.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@124

23 years agoMore glibc-2.1.X compiler fixes (Lionel Ulmer).
Julian Seward [Wed, 24 Apr 2002 02:20:20 +0000 (02:20 +0000)] 
More glibc-2.1.X compiler fixes (Lionel Ulmer).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@123

23 years agominor tweaks to constants
Julian Seward [Wed, 24 Apr 2002 02:19:36 +0000 (02:19 +0000)] 
minor tweaks to constants

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@122

23 years agoFast-track pthread_mutex_{lock,unlock} in the scheduler. This reduces
Julian Seward [Wed, 24 Apr 2002 01:57:27 +0000 (01:57 +0000)] 
Fast-track pthread_mutex_{lock,unlock} in the scheduler.  This reduces
their cost by about a factor of 20, which fixes the performance probs
observed with Opera.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@121

23 years agoFix total b0rkage of signal handling caused by stupidly giving the
Julian Seward [Wed, 24 Apr 2002 01:17:42 +0000 (01:17 +0000)] 
Fix total b0rkage of signal handling caused by stupidly giving the
same value to VG_USERREQ__READ_MILLISECOND_TIMER and
VG_USERREQ__SIGNAL_RETURNS.  Duh.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@120

23 years agoVarious upgrades, with the effect that mozilla now runs, although
Julian Seward [Tue, 23 Apr 2002 16:52:51 +0000 (16:52 +0000)] 
Various upgrades, with the effect that mozilla now runs, although
it has tremendous performance problems.

* Implement pthread_key_{create,delete} and pthread_{set,get}specific.

* Implement pthread_cond_timedwait.  A nuisance.

* New timer infrastructure, based on the RDTSC instruction.  This
  allows fast, accurate time measurement without swamping the host with
  gettimeofday() syscalls.

There's something definitely screwy about the scheduler, making opera
run slowly and mozilla run unbelievably slowly.  To be investigated.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@119

23 years agoDeal properly with client arguments with spaces in. (Aharon Robbins).
Julian Seward [Mon, 22 Apr 2002 22:26:51 +0000 (22:26 +0000)] 
Deal properly with client arguments with spaces in.  (Aharon Robbins).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@118

23 years agoCompilation fixes for glibc-2.1.X systems. (Lionel Ulmer).
Julian Seward [Mon, 22 Apr 2002 12:45:25 +0000 (12:45 +0000)] 
Compilation fixes for glibc-2.1.X systems.  (Lionel Ulmer).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@117

23 years agoI feel like doing a snapshot today; hence date -> 0422.
Julian Seward [Mon, 22 Apr 2002 12:42:55 +0000 (12:42 +0000)] 
I feel like doing a snapshot today; hence date -> 0422.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@116

23 years agoGDB-attach cleanups. Have our own system() so we don't have to use
Julian Seward [Sun, 21 Apr 2002 22:03:07 +0000 (22:03 +0000)] 
GDB-attach cleanups.  Have our own system() so we don't have to use
glibc's, and tell the user if starting GDB failed for some reason.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@115

23 years ago%@]$*$* Intel and their %@]$*$* stupid braindead assembler mnemonics!
Julian Seward [Sun, 21 Apr 2002 20:26:06 +0000 (20:26 +0000)] 
%@]$*$* Intel and their %@]$*$* stupid braindead assembler mnemonics!

It's not that I'm incompetent.  Honest.

Fix bug causing GDB attach (detach) to crash system on multithreaded
programs.  This bug has been in Valgrind all along.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@114

23 years ago- don't check if the compiler supports const. No compiler we care
Dirk Mueller [Sun, 21 Apr 2002 13:32:28 +0000 (13:32 +0000)] 
- don't check if the compiler supports const. No compiler we care
  about doesn't support it
- readd -Werror
- move setting of CFLAGS to the Makefile instead of the configure
  script, to avoid that the custom flags we use screw up configure checks

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@113

23 years agofix compilation
Dirk Mueller [Sun, 21 Apr 2002 13:25:53 +0000 (13:25 +0000)] 
fix compilation

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@112

23 years agoMake the GDB-attach stuff thread-aware, and work (at least partially)
Julian Seward [Sun, 21 Apr 2002 13:05:34 +0000 (13:05 +0000)] 
Make the GDB-attach stuff thread-aware, and work (at least partially)
when running multithreaded.  Can still cause crashes (assertion failures)
when GDB exits.  I think it that's due to my use of libc's system()
call; should roll my own.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@111

23 years agoAdd a nonblocking poll() -- same trick as nonblocking select().
Julian Seward [Sun, 21 Apr 2002 12:19:41 +0000 (12:19 +0000)] 
Add a nonblocking poll() -- same trick as nonblocking select().
Add pthread_cond_destroy().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@110

23 years agoAdd JCond-32 NP (long jump when parity odd) and CMOV NP too.
Julian Seward [Sun, 21 Apr 2002 11:43:11 +0000 (11:43 +0000)] 
Add JCond-32 NP (long jump when parity odd) and CMOV NP too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@109

23 years agoMinor tweaks to the nonblocking select() implementation.
Julian Seward [Sun, 21 Apr 2002 01:08:26 +0000 (01:08 +0000)] 
Minor tweaks to the nonblocking select() implementation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@108

23 years agoAdd pthread_mutex_trylock, and add various other hacks to try and make
Julian Seward [Sun, 21 Apr 2002 00:13:57 +0000 (00:13 +0000)] 
Add pthread_mutex_trylock, and add various other hacks to try and make
Mozilla work.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@107

23 years agoAdd comments explaining checks made by scheduler_sanity().
Julian Seward [Sat, 20 Apr 2002 20:53:17 +0000 (20:53 +0000)] 
Add comments explaining checks made by scheduler_sanity().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@106

23 years agoSigh. Remove -Werror because it causes the ./configure test for working
Julian Seward [Sat, 20 Apr 2002 15:49:34 +0000 (15:49 +0000)] 
Sigh.  Remove -Werror because it causes the ./configure test for working
const qualifier to fail.  This causes config.h to #define const to nothing,
which causes the whole compilation to fail.

What's the right way to fix this?  I really like having -Werror.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@105

23 years agoAdd pthread_condattr_destroy.
Julian Seward [Sat, 20 Apr 2002 13:59:33 +0000 (13:59 +0000)] 
Add pthread_condattr_destroy.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@104

23 years agoSnapshot date -> 20020420.
Julian Seward [Sat, 20 Apr 2002 13:56:38 +0000 (13:56 +0000)] 
Snapshot date -> 20020420.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@103

23 years agoAdd fairly complete, and apparently working, support for condition
Julian Seward [Sat, 20 Apr 2002 13:53:23 +0000 (13:53 +0000)] 
Add fairly complete, and apparently working, support for condition
variables.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@102

23 years agoVG_(record_free_error) / VG_(record_freemismatch_error) are called
Julian Seward [Fri, 19 Apr 2002 15:43:37 +0000 (15:43 +0000)] 
VG_(record_free_error) / VG_(record_freemismatch_error) are called
by the scheduler, not by generated code.  So pass in the relevant
ThreadState*; don't get it from VG_(get_current_tid)().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@101

23 years agoContinue trying to extract myself from the pthread_mutex_* swamp.
Julian Seward [Fri, 19 Apr 2002 14:40:57 +0000 (14:40 +0000)] 
Continue trying to extract myself from the pthread_mutex_* swamp.

Fall back to a compromise position, which makes my mutex implementation
initialiser- and structure-compatible with LinuxThreads, and ditto the
upcoming condition var implementation.  In particular this means that
((ThreadId)0) is an invalid thread ID, so vg_threads[0] is never used,
and vg_threads[1] specially denotes the "main" thread.

Remove the scheme of having a linked list of threads waiting on
each mutex.  It is too difficult to get the right semantics for
when a signal is delivered to a thread blocked in pthread_mutex_lock().
Instead, use the old scheme of each thread stating with its .waited_on_mx
field, which mutex it is waiting for.  This makes pthread_mutex_unlock()
less efficient, but at least it all works.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@100

23 years agoSimply and rationalise pthread_mutex implementation, in preparation
Julian Seward [Thu, 18 Apr 2002 22:38:41 +0000 (22:38 +0000)] 
Simply and rationalise pthread_mutex implementation, in preparation
for implementation of condition variables.

* Use the native pthread_mutex_t directly; we no longer have our own
  VgMutex type nor a fixed array of them.

* Give ThreadState a new field q_next :: ThreadId, used to make a
  linked list of threads waiting on a mutex, or condition variable.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@99

23 years agoYay! Opera (6.0TP2) now works.
Julian Seward [Thu, 18 Apr 2002 11:37:52 +0000 (11:37 +0000)] 
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

23 years agoCompile flags += -Werror. I'm tired of looking carefully for warnings.
Julian Seward [Thu, 18 Apr 2002 10:03:02 +0000 (10:03 +0000)] 
Compile flags += -Werror.  I'm tired of looking carefully for warnings.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@97

23 years agoOops! The floating-point conditional-move instructions read %EIP, so
Julian Seward [Thu, 18 Apr 2002 02:18:24 +0000 (02:18 +0000)] 
Oops!  The floating-point conditional-move instructions read %EIP, so
we'd better annotate them as such!

Fixes a floating-point misbehaviour bug reported by Robert W. Anderson
<anderson110@poptop.llnl.gov>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@95

23 years agoSanity check mutex implementation, and add support for recursive mutexes.
Julian Seward [Wed, 17 Apr 2002 23:21:37 +0000 (23:21 +0000)] 
Sanity check mutex implementation, and add support for recursive mutexes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@94

23 years agoGet rid of bogus vg_assert(VG_(bbs_done) < 1000000);
Julian Seward [Wed, 17 Apr 2002 19:40:49 +0000 (19:40 +0000)] 
Get rid of bogus       vg_assert(VG_(bbs_done) < 1000000);
intended to test previous commit.  Duh.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@93

23 years agoShow backtraces for all threads in vg_assert, VG_(panic) and
Julian Seward [Wed, 17 Apr 2002 19:35:12 +0000 (19:35 +0000)] 
Show backtraces for all threads in vg_assert, VG_(panic) and
VG_(unimplemented).  In future this will not be enabled by default due
to the danger of recursion of assertion failures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@92

23 years agoChange --trace-pthread= flag to accept none|some|all, for finer level
Julian Seward [Tue, 16 Apr 2002 22:50:32 +0000 (22:50 +0000)] 
Change --trace-pthread= flag to accept none|some|all, for finer level
of pthread event tracing.  And allow this info to be passed across to
the client, where vg_libpthread.c uses it to also control verbosity.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@91

23 years agoignore
Dirk Mueller [Tue, 16 Apr 2002 10:53:53 +0000 (10:53 +0000)] 
ignore

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@90

23 years agoAdd more pthread wrappers in a failed attempt to get Opera 6.0TP2
Julian Seward [Tue, 16 Apr 2002 04:40:49 +0000 (04:40 +0000)] 
Add more pthread wrappers in a failed attempt to get Opera 6.0TP2
to run.  Now it creates some threads but segfaults.  Also add
wrapper for syscall __NR_mremap; it is way wrong, but finding
a decent description of what mremap() really does is nearly
impossible.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@89

23 years agoHandle VG_USERREQ__PTHREAD_GET_THREADID and VG_USERREQ__RUNNING_ON_VALGRIND
Julian Seward [Tue, 16 Apr 2002 03:44:31 +0000 (03:44 +0000)] 
Handle VG_USERREQ__PTHREAD_GET_THREADID and VG_USERREQ__RUNNING_ON_VALGRIND
cheaply, with the trivial-client-request mechanism.  The latter is called
once per pthread call, even simple ones like pthread_mutex_[un]lock.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@88

23 years agoGet rid of the muraroa.demon.co.uk references since that account is
Julian Seward [Tue, 16 Apr 2002 02:51:05 +0000 (02:51 +0000)] 
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

23 years agoUpdate the message on clone() failure to reflect new pthreads work.
Julian Seward [Tue, 16 Apr 2002 02:09:31 +0000 (02:09 +0000)] 
Update the message on clone() failure to reflect new pthreads work.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@82

23 years agoMake --demangle=no work as advertised.
Julian Seward [Tue, 16 Apr 2002 02:05:49 +0000 (02:05 +0000)] 
Make --demangle=no work as advertised.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@81

23 years agoDon't refer to IPC_64 if it doesn't exist. Was breaking builds on older
Julian Seward [Tue, 16 Apr 2002 01:58:19 +0000 (01:58 +0000)] 
Don't refer to IPC_64 if it doesn't exist.  Was breaking builds on older
systems.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@80

23 years agoGet rid of the --client-perms= flag. Valgrind now depends critically
Julian Seward [Tue, 16 Apr 2002 01:55:18 +0000 (01:55 +0000)] 
Get rid of the --client-perms= flag.  Valgrind now depends critically
on the client-request subsystem, and disabling it is no longer a
sensible thing to do.

Also: in the manual, mention flags --trace-sched= and --trace-pthread=.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@79

23 years agoDon't skip the top frame when picking up ExeContexts for malloc etc.
Julian Seward [Tue, 16 Apr 2002 01:10:18 +0000 (01:10 +0000)] 
Don't skip the top frame when picking up ExeContexts for malloc etc.
This restores the pre-pthread-merge behaviour.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@78

23 years agoFix -Wall complaints.
Julian Seward [Tue, 16 Apr 2002 00:57:02 +0000 (00:57 +0000)] 
Fix -Wall complaints.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@77

23 years agoRelent, and properly implement bt/bts/btc/btr for literal bit-offsets.
Julian Seward [Tue, 16 Apr 2002 00:42:12 +0000 (00:42 +0000)] 
Relent, and properly implement bt/bts/btc/btr for literal bit-offsets.
bt_literal.c is a somewhat halfhearted test case for it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@76

23 years agoGet rid of the old bt/bts/btr/btc implementation.
Julian Seward [Mon, 15 Apr 2002 18:36:39 +0000 (18:36 +0000)] 
Get rid of the old bt/bts/btr/btc implementation.

Turns out these insns are also available as Grp8 extensions, with
literal bit-offset values.  Nuisance.  I've #if 0'd out the old code
which implements them since am too lazy to fix them properly, and I
can't find any cases of their use anyway.  I'll wait until someone
yelps.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@75

23 years agoAdd fairly comprehensive test case for bt/bts/btc/btc, mem and reg
Julian Seward [Mon, 15 Apr 2002 16:01:47 +0000 (16:01 +0000)] 
Add fairly comprehensive test case for bt/bts/btc/btc, mem and reg
targets, although size-L (4-byte) only.  In any event the jitter
doesn't handle the size 2 case and has never been asked too, AFAIK.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@74

23 years agoCorrectly implement x86 bt/btc/bts/btr insn. Previous impl was wrong:
Julian Seward [Mon, 15 Apr 2002 14:35:28 +0000 (14:35 +0000)] 
Correctly implement x86 bt/btc/bts/btr insn.  Previous impl was wrong:

* Didn't handle correctly operands in memory, where arbitrary signed
  bit offsets are allowed.  Prior impl will trash the client's stack
  and give the wrong answer.

* Was done by a helper function and therefore could give spurious
  value errors.

Now the address computations are done in-line.

Old implementation is there, but unused and scheduled for demolition.

Test case to follow.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@73

23 years agomalloc() and friends have moved to vg_clientfuncs.c, so move the
Julian Seward [Mon, 15 Apr 2002 14:27:48 +0000 (14:27 +0000)] 
malloc() and friends have moved to vg_clientfuncs.c, so move the
-fno-omit-frame-pointer flag there too.  Otherwise they are invisible
in backtraces.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@72

23 years agofix initial installation problem
Dirk Mueller [Mon, 15 Apr 2002 00:54:13 +0000 (00:54 +0000)] 
fix initial installation problem

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@71

23 years agosome workarounds for newer automake
Dirk Mueller [Mon, 15 Apr 2002 00:31:58 +0000 (00:31 +0000)] 
some workarounds for newer automake

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@70

23 years agouse install-exec-hook to create the .so.0 symlink.
Frédéric Gobry [Sun, 14 Apr 2002 15:31:19 +0000 (15:31 +0000)] 
use install-exec-hook to create the .so.0 symlink.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@69

23 years agoFix problems to do with make dist/make distcheck not finding the source
Julian Seward [Sun, 14 Apr 2002 14:32:54 +0000 (14:32 +0000)] 
Fix problems to do with make dist/make distcheck not finding the source
file vg_libpthread.so.0.c.  Now:

* libpthread.so is built as just-another-so, like valgrind.so and
  valgrinq.so.

* there is a new dummy target libpthread.so.0 which is build just
  by a symlink.

Unfortunately for some reason, when the .so.0 is installed, it gets
a complete copy rather than just the symlink being copied.  But it
works, at least.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@68

23 years agoTurn off debug printing by default.
Julian Seward [Sun, 14 Apr 2002 13:27:00 +0000 (13:27 +0000)] 
Turn off debug printing by default.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@67

23 years agoAdd dummy stubs for pthread_key_create, pthread_key_delete,
Julian Seward [Sun, 14 Apr 2002 13:13:05 +0000 (13:13 +0000)] 
Add dummy stubs for pthread_key_create, pthread_key_delete,
pthread_setspecific, pthread_getspecific.  They don't do anything
right now and may well crash programs which use them.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@66

23 years ago* external namespace check
Julian Seward [Sun, 14 Apr 2002 13:01:38 +0000 (13:01 +0000)] 
* external namespace check
* VG_(printf) format strings check

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@65

23 years agoPlumb the right %EIP and %EBP values through to VG_(get_ExeContext)
Julian Seward [Sun, 14 Apr 2002 04:16:48 +0000 (04:16 +0000)] 
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

23 years agoMinor cleanups:
Julian Seward [Sun, 14 Apr 2002 02:46:33 +0000 (02:46 +0000)] 
Minor cleanups:
* when a thread exits, mark its stack as noaccess
* print VgTs_Sleeping status correctly

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@63

23 years agoTake notice of SA_RESTART flags on signals, so as to deal (at least
Julian Seward [Sun, 14 Apr 2002 02:29:29 +0000 (02:29 +0000)] 
Take notice of SA_RESTART flags on signals, so as to deal (at least
partially properly) with blocking system calls interrupted by signals.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@62

23 years agoAdd wrapper for lseek().
Julian Seward [Sat, 13 Apr 2002 04:18:32 +0000 (04:18 +0000)] 
Add wrapper for lseek().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@61

23 years agopoll_for_read_fds(): don't waste time calling select() if there are
Julian Seward [Sat, 13 Apr 2002 04:09:07 +0000 (04:09 +0000)] 
poll_for_read_fds(): don't waste time calling select() if there are
no waiting fds.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@60

23 years agoUltra-hacking implementation of non-blocking select() using blocking
Julian Seward [Sat, 13 Apr 2002 03:45:44 +0000 (03:45 +0000)] 
Ultra-hacking implementation of non-blocking select() using blocking
select and non-blocking nanosleep().  Barf.  Does seem to work tho.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@59

23 years agoWrite return address for threads in assembly so we can reliably
Julian Seward [Sat, 13 Apr 2002 00:08:51 +0000 (00:08 +0000)] 
Write return address for threads in assembly so we can reliably
grab their return values.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@58

23 years agoCleanup of the dispatch mechanism. Now syscall returns and the final
Julian Seward [Fri, 12 Apr 2002 23:24:59 +0000 (23:24 +0000)] 
Cleanup of the dispatch mechanism.  Now syscall returns and the final
request to shutdown valgrind are done with the client request
mechanism too.  This is much better than having to check all
call/return addresses.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@57

23 years agosimple_mutex program from the OReilly pthreads book.
Julian Seward [Fri, 12 Apr 2002 21:57:01 +0000 (21:57 +0000)] 
simple_mutex program from the OReilly pthreads book.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@56

23 years agoClean up debug printing for scheduler / pthreads. Two new flags,
Julian Seward [Fri, 12 Apr 2002 20:12:20 +0000 (20:12 +0000)] 
Clean up debug printing for scheduler / pthreads.  Two new flags,
--trace-sched=no|yes and --trace-pthread=no|yes, if you really want
to see tons of gory details.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@55

23 years agoadded rules to generate libpthread.so
Frédéric Gobry [Fri, 12 Apr 2002 13:32:11 +0000 (13:32 +0000)] 
added rules to generate libpthread.so

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@54

23 years agoOops! An important file I forgot to add (is part of the pthread_
Julian Seward [Fri, 12 Apr 2002 11:49:29 +0000 (11:49 +0000)] 
Oops!  An important file I forgot to add (is part of the pthread_
mega-merge).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@53

23 years agoMega-merge of my last 2 weeks hacking. This basically does the groundwork
Julian Seward [Fri, 12 Apr 2002 11:12:52 +0000 (11:12 +0000)] 
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

23 years agoNew files to support pthreads.
Julian Seward [Fri, 12 Apr 2002 10:26:32 +0000 (10:26 +0000)] 
New files to support pthreads.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@51

23 years agocosmetic fixes
Frédéric Gobry [Thu, 11 Apr 2002 06:58:55 +0000 (06:58 +0000)] 
cosmetic fixes

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@50

23 years agoAdd spurious comment.
Julian Seward [Wed, 10 Apr 2002 13:48:03 +0000 (13:48 +0000)] 
Add spurious comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@49

23 years agoFrom the OReilly book, page 15. Uses _create and _join.
Julian Seward [Wed, 10 Apr 2002 12:14:34 +0000 (12:14 +0000)] 
From the OReilly book, page 15.  Uses _create and _join.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@48