]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
23 years agoClean up; deal with tedious error handling etc.
Julian Seward [Wed, 6 Nov 2002 00:15:50 +0000 (00:15 +0000)] 
Clean up; deal with tedious error handling etc.

Still needs work; command line stuff for specifying a non-default port,
and a flag to say 'exit when # connections falls to zero.'

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

23 years agoRename VG_CLO_DEFAULT_LOGSOCKET to VG_CLO_DEFAULT_LOGPORT.
Julian Seward [Tue, 5 Nov 2002 23:37:35 +0000 (23:37 +0000)] 
Rename VG_CLO_DEFAULT_LOGSOCKET to VG_CLO_DEFAULT_LOGPORT.

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

23 years agoFix a buffering problem, so the output can sensibly be piped through
Julian Seward [Sun, 3 Nov 2002 23:27:40 +0000 (23:27 +0000)] 
Fix a buffering problem, so the output can sensibly be piped through
/usr/bin/tee.

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

23 years agoAdd a simple listener program, which captures output from --logsocket=.
Julian Seward [Sun, 3 Nov 2002 23:03:24 +0000 (23:03 +0000)] 
Add a simple listener program, which captures output from --logsocket=.
Works, but needs refinement, + connection to the build system.

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

23 years agoAdd a new client request, VG_USERREQ__LOGMESSAGE, and use this to route
Julian Seward [Sun, 3 Nov 2002 13:41:41 +0000 (13:41 +0000)] 
Add a new client request, VG_USERREQ__LOGMESSAGE, and use this to route
all commentary from our libpthread.so through to the valgrind core and
hence to the selected logging sink.

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

23 years agoRobustification of logging to a socket. If the listener process dies
Julian Seward [Sun, 3 Nov 2002 11:44:36 +0000 (11:44 +0000)] 
Robustification of logging to a socket.  If the listener process dies
or for whatever reason hangs up the connection, don't let valgrind
get SIGPIPE; instead just switch back to spewing messages on stderr.

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

23 years agoImplement logging to a network socket. So it's now possible to do
Julian Seward [Sun, 3 Nov 2002 03:20:15 +0000 (03:20 +0000)] 
Implement logging to a network socket.  So it's now possible to do
valgrind ... --logsocket=192.168.0.1:1500 or whatever, to send all
output to that address/port combination.

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

23 years agoFixed minor problem in regtest script.
Nicholas Nethercote [Wed, 30 Oct 2002 15:23:05 +0000 (15:23 +0000)] 
Fixed minor problem in regtest script.

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

23 years agoFixed minor problem in regtest script.
Nicholas Nethercote [Wed, 30 Oct 2002 15:22:03 +0000 (15:22 +0000)] 
Fixed minor problem in regtest script.

Added missing filter for none/tests.

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

23 years agoImplement --logfile=<file>, which causes all the log output to be
Julian Seward [Sun, 27 Oct 2002 20:28:29 +0000 (20:28 +0000)] 
Implement --logfile=<file>, which causes all the log output to be
written to "<file>.pid<pid>".  Useful for tracing trees of processes.

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

23 years agoIncrease M_LOCKSET_TABLE to 5000, for Mozilla.
Julian Seward [Wed, 23 Oct 2002 22:45:08 +0000 (22:45 +0000)] 
Increase M_LOCKSET_TABLE to 5000, for Mozilla.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:58:55 +0000 (21:58 +0000)] 
Merge patch from Jeremy Fitzhardinge:

19-hg-lockgraph
  HELGRIND: large patch which does a big bugfix and adds some new
  instrumentation:

  1. The bugfix is BIG. Previously the code which maintained the
  thread's current lockset would often (maybe always) fail to add new
  locks to the set, so it always looked like threads were holding one
  lock. The problem was in weird_LockSet_equals(); I rewrote it in a way
  which should be obviously correct. Fixing this exposed a bug in
  removing locks from a thread's lockset, which was also caused by
  another bug in weird_LockSet_equals(). This fix makes many spurious
  data race warnings go away (notably, stdio becomes silent).

  2. The new feature is tracking of the order of lock usage. If
  threads are taking locks in an inconsistent order, that's a symptom of
  possible deadlock. Helgrind will now warn when it sees this happening
  (though the warnings themselves need to be improved).

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:55:01 +0000 (21:55 +0000)] 
Merge patch from Jeremy Fitzhardinge:

18-recv-nonblock
  Make recv() nonblocking.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:53:49 +0000 (21:53 +0000)] 
Merge patch from Jeremy Fitzhardinge:

16-function-intercept
  Implement a more reliable for vg_libpthread to intercept libc
  calls. Since the only reliable way of making sure that our code
  defines the symbol is by making sure that valgrind.so itself does it,
  this patch adds a new file, vg_intercept.so, which defines those
  symbols. They are then passed off to a weak local function if
  libpthread isn't present, or to the libpthread version if it is.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:49:33 +0000 (21:49 +0000)] 
Merge patch from Jeremy Fitzhardinge:

02-sysv-msg
  Support for threaded programs using msgsnd/msgrcv.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:46:13 +0000 (21:46 +0000)] 
Merge patch from Jeremy Fitzhardinge:

14-hg-mmap-magic-virgin
  This does two things:

  1. change the signatures of the new_mem_mmap and change_mem_mprotect
  functions to remove the pointless 'nn' argument. This makes them match
  the signature of new_mem_startup...

  2. change helgrind to mark memory created by mmap as if it were the
  same as other magically pre-inited memory. Implement this by pointing
  helgrind's new_mem_mmap function at new_mem_startup.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:38:22 +0000 (21:38 +0000)] 
Merge patch from Jeremy Fitzhardinge:

13-kill-1ifroot
  Kill VG_(get_current_tid_1_if_root)() and replace it with the slightly
  more appetising (though still hackish)
  VG_(get_current_or_recent_tid)(). This is intended for use when
  there's no thread actually loaded into the baseblock, but we're doing
  work on behalf of the the thread that was last running (such as during
  a syscall).

  This probably fixes a bug with helgrind misattributing memory created
  with mmap to thread 1 rather than the thread which called mmap (though
  the behaviour is still probably wrong: mmapped memory should be
  magically_inited).

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Wed, 23 Oct 2002 21:35:00 +0000 (21:35 +0000)] 
Merge patch from Jeremy Fitzhardinge:

13-fix-printf
  Fix stupid bug I introduced into printf with 14-sprintf.

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

23 years agoFixed some argument type wibbles, pointed out by Arnaud Desitter.
Nicholas Nethercote [Wed, 23 Oct 2002 12:54:11 +0000 (12:54 +0000)] 
Fixed some argument type wibbles, pointed out by Arnaud Desitter.

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

23 years ago(Josef Weidendorfer):
Julian Seward [Tue, 22 Oct 2002 05:41:14 +0000 (05:41 +0000)] 
(Josef Weidendorfer):
Workaround bad DWARF2 line info generated by the Intel Fortran compiler.

There is a big comment in the sources explaining more.

MERGE TO STABLE

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 05:09:36 +0000 (05:09 +0000)] 
Merge patch from Jeremy Fitzhardinge:

21-hg-dupwrite
  HELGRIND: quite often memory is written with a value which is already
  there, which would not cause a race (I think; there are certainly
  valid idioms which rely on this behaviour). Anyway, suppressing checks
  for such overwrites cuts down the number of apparently spurious
  errors. Also fixes the bug in which FP loads were considered to be
  stores.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 05:05:49 +0000 (05:05 +0000)] 
Merge patch from Jeremy Fitzhardinge:

20-hg-secmap
  HELGRIND: fix bugs causing a torrent of "access to distingished map"
  messages. There were two: one is some absurdly broken rounding/padding
  code in set_address_range_state() (how did anything work!?). The other
  was some odd looking code in the tracking of attaching shared memory
  segments. Since they're semantically very similar to mmap, track them
  as such.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 04:59:26 +0000 (04:59 +0000)] 
Merge patch from Jeremy Fitzhardinge:

19-hg-context
  HELGRIND: Yet more work on making sure the right context is used when
  reporting errors. The previous code used the snapshot of the thread
  context in the VG_(threads) array rather than the current machine
  state in the baseBlock. This patch makes sure that errors arising from
  program reads and writes are reported properly.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 04:55:54 +0000 (04:55 +0000)] 
Merge patch from Jeremy Fitzhardinge:

18-hg-err-reporting
  HELGRIND: show more information about the address we're reporting a
  possible data race for; in particular, try to describe where the
  address came from (static variable, or heap allocated and if so
  where?) (Mostly stolen from memcheck). Also puts memory locations
  involved with an error into an error state, so that duplicate errors
  are suppressed. Also displays the last good set of locks for a memory
  location.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 04:54:55 +0000 (04:54 +0000)] 
Merge patch from Jeremy Fitzhardinge:

17-hg-generic-mutex
  HELGRIND: remove references to pthread_mutex_t and replace it with a
  more generic notion of a mutex. Adds a persistent store of per-mutex
  information. Not presently useful, but will be.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 04:45:48 +0000 (04:45 +0000)] 
Merge patch from Jeremy Fitzhardinge:

14-sprintf
  Update to core VG_(printf)/sprintf/vprintf. They've been modified to
  return the number of characters they generated (either printed, put
  into the buffer, or sent). Also adds a new %y format, which takes an
  Addr argument and looks up a symbol. It takes a '(' flag (ie: "%(y")
  which surrounds the symbol in parens if it could be found.

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

23 years agoPartially merge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 04:30:35 +0000 (04:30 +0000)] 
Partially merge patch from Jeremy Fitzhardinge:

13-track-condvar-mutex
  This fixes mutex lock/unlock tracking. In particular, it gets
  tracking of mutex ownership over condition variables correct.

I didn't take the bits to do with vg_tid_currently_in_baseBlock's value
when baseBlock is empty.

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

23 years agoMerge patch from Jeremy Fitzhardinge:
Julian Seward [Tue, 22 Oct 2002 04:14:35 +0000 (04:14 +0000)] 
Merge patch from Jeremy Fitzhardinge:

08-skin-clientreq
  Introduce a systematic way for skins to distinguish each other's
  client requests. Uses the de-facto standard two-letter identifiers in
  the top two bytes of the client request code. Also changes the
  interface to SK_(handle_client_request) so that a skin can say whether
  or not it handled the request, which allows correct setting of the
  default return value if the request was not handled.

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

23 years agoCommon up leak detection stuff which was previously duplicated in Memcheck
Julian Seward [Mon, 21 Oct 2002 07:29:59 +0000 (07:29 +0000)] 
Common up leak detection stuff which was previously duplicated in Memcheck
and Addrcheck.  In coregrind/vg_memory.c, create

   void VG_(generic_detect_memory_leaks

and remove several hundred lines of code from both ac_main.c and mc_main.c.

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

23 years agomerge patch from Jeremy Fitzhardinge:
Julian Seward [Sun, 20 Oct 2002 19:50:07 +0000 (19:50 +0000)] 
merge patch from Jeremy Fitzhardinge:

16-ld-nodelete
  Add -Wl,-z,nodelete,-z,initfirst to link line for libpthread.so,
  because HJ [Lu] says so. Also add soname.

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

23 years agomerge patch from Jeremy Fitzhardinge:
Julian Seward [Sun, 20 Oct 2002 19:43:47 +0000 (19:43 +0000)] 
merge patch from Jeremy Fitzhardinge:

15-hg-datasym
  HELGRIND: In conjunction with patch 13-data-syms, print symbolic
  information for addresses in error messages (if possible).

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

23 years agomerge patches from Jeremy Fitzhardinge:
Julian Seward [Sun, 20 Oct 2002 19:40:32 +0000 (19:40 +0000)] 
merge patches from Jeremy Fitzhardinge:

14-hg-tid
  HELGRIND: This fixes a bug in Helgrind in which all memory access by
  syscalls was being treated as if it were happening in thread 1. This
  is because the eraser_mem_read/write functions were using
  get_current_tid_1_if_root() to get the current tid. Unfortunately,
  during syscalls there is no current thread, so it was getting
  1_if_root. This patch fixes this by using what thread ID information
  we're given, and only using get_current_tid() if we're recording a
  memory access performed by code (rather than by a syscall).

... which relies on ...

06-memops
  Implement VG_(memcpy/memset).

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

23 years agoMerge 13-data-syms from Jeremy Fitzhardinge:
Julian Seward [Sun, 20 Oct 2002 19:29:21 +0000 (19:29 +0000)] 
Merge 13-data-syms from Jeremy Fitzhardinge:

Fix to the ELF file reader to make sure that each SegInfo includes not
only the text mapped from an ELF file, but also the data and bss. This
allows the data symbols to be extracted. Also adds a new needs boolean
to allow a skin to specify if it needs data symbols. As a nice
side-effect, it removes the "offset" hack: the offset is the mapped
address in the ELF Phdr: it is (mapped_address - phdr_vaddr).

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

23 years agoMerge 07-seginfo from Jeremy Fitzhardinge:
Julian Seward [Sun, 20 Oct 2002 18:35:48 +0000 (18:35 +0000)] 
Merge 07-seginfo from Jeremy Fitzhardinge:

API for skins to extract information about mapped segments.

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

23 years agomerge (in effect, and without docs) revs:
Julian Seward [Sun, 20 Oct 2002 18:11:49 +0000 (18:11 +0000)] 
merge (in effect, and without docs) revs:
   valgrind.in       1.17.2.3
   vg_syscall_mem.c 1.58.2.12

Add Jeremy Fitzhardinge's --weird-hacks=lax-ioctls patch, and add some docs.

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

23 years agomerge rev 1.8.2.2:
Julian Seward [Sun, 20 Oct 2002 16:27:43 +0000 (16:27 +0000)] 
merge rev 1.8.2.2:

Add a suppression for R H 7.3 on i686.

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

23 years agomerge rev 1.90.2.12:
Julian Seward [Sun, 20 Oct 2002 16:25:55 +0000 (16:25 +0000)] 
merge rev 1.90.2.12:

Put __pthread_getspecific_addr inside ifdefs.

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

23 years agomerge rev 1.90.2.11:
Julian Seward [Sun, 20 Oct 2002 16:24:04 +0000 (16:24 +0000)] 
merge rev 1.90.2.11:

Create __ versions of the select and poll symbols, so that all
references are caught (Jeremy Fitzhardinge)

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

23 years agomerge revs
Julian Seward [Sun, 20 Oct 2002 16:22:57 +0000 (16:22 +0000)] 
merge revs
   vg_libpthread.c       1.90.2.10
   vg_libpthread_unimp.c 1.30.2.5

Implement (sort-of) pthread_attr_{set,get}guardsize.

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

23 years agomerge rev 1.68.2.11:
Julian Seward [Wed, 16 Oct 2002 23:13:00 +0000 (23:13 +0000)] 
merge rev 1.68.2.11:

Add ever more new ioctls and syscalls.

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

23 years agomerge revs
Julian Seward [Wed, 16 Oct 2002 19:45:06 +0000 (19:45 +0000)] 
merge revs
   vg_libpthread.c 1.90.2.9
   vg_libpthread_unimp.c 1.30.2.4

Add sem_timedwait().  From Scott Smith <sls@cs.unt.edu>.

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

23 years agomerge rev 1.35.2.6:
Julian Seward [Wed, 16 Oct 2002 19:41:41 +0000 (19:41 +0000)] 
merge rev 1.35.2.6:

Change the capitalisation of Reuben's Mite.

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

23 years agomerge rev 1.29.2.8:
Julian Seward [Wed, 16 Oct 2002 19:40:04 +0000 (19:40 +0000)] 
merge rev 1.29.2.8:

Implement primary opcode 0x1A (SBB Eb,Gb).

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

23 years agomake it work with newer autoconf
Dirk Mueller [Wed, 16 Oct 2002 13:09:26 +0000 (13:09 +0000)] 
make it work with newer autoconf

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

23 years agoMinor update.
Nicholas Nethercote [Wed, 16 Oct 2002 08:38:58 +0000 (08:38 +0000)] 
Minor update.

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

23 years agoWibbles, thanks to Arnaud Desitter.
Nicholas Nethercote [Tue, 15 Oct 2002 08:48:08 +0000 (08:48 +0000)] 
Wibbles, thanks to Arnaud Desitter.

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

23 years agoAdded VG_(rename) (untested), and made VG_(bbs_done) visible to skins, both at
Nicholas Nethercote [Mon, 14 Oct 2002 09:25:37 +0000 (09:25 +0000)] 
Added VG_(rename) (untested), and made VG_(bbs_done) visible to skins, both at
the request of Josef Weidendorfer for his KCachegrind stuff.

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

23 years agoMoved baseBlock initialisation to after command-line processing, for skins that
Nicholas Nethercote [Mon, 14 Oct 2002 09:25:19 +0000 (09:25 +0000)] 
Moved baseBlock initialisation to after command-line processing, for skins that
don't register helpers until command-line options are seen.  As requested by
Jeremy Fitzhardinge.  Also neatened the code up marginally.

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

23 years agoIncorporate horrible hack to workaround problem of emitting bogus
Julian Seward [Sun, 13 Oct 2002 00:57:26 +0000 (00:57 +0000)] 
Incorporate horrible hack to workaround problem of emitting bogus
uninit-value errors on code with inlined strlen() et al from gcc-3.1
and above.

MERGE TO STABLE

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

23 years agoFixes for the DWARF2 reader, from Josef Weidendorfer:
Julian Seward [Sat, 12 Oct 2002 17:27:16 +0000 (17:27 +0000)] 
Fixes for the DWARF2 reader, from Josef Weidendorfer:

Attached patch is for the Dwarf2 source line info reader;
For reading, a state machine is used reconstructing source line
info while running and reading (see DWARF2 specification, ch. 6.2).
The state machine was correct, but the calls to addLineInfo()
were wrong: It reported most of the times too small ranges
for source code statements, because it used only the diff of the last
state machine command instead of the diff to the last statement
boundary. Effect: Around 1/3 of all addresses with source line info got
unknown location.
The patch adds a "last_address" to the state machine to remember the last
statement boundary. On reset, it#s initialised to the "invalid" address 0. I
hope this is OK (or should we use "(Addr)-1" instead?).
The patch now uses the "is_stmt" boolean correctly to only call addLineInfo()
if there's a statement boundary (on x86, is_stmt most probably is
always true...).

MERGE TO STABLE

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

23 years agoFinish off support for Red Hat 8 thread-specific-data. Unfortunately
Julian Seward [Sat, 12 Oct 2002 16:42:35 +0000 (16:42 +0000)] 
Finish off support for Red Hat 8 thread-specific-data.  Unfortunately
the appearance of libc_internal_tsd_address requires a redesign, since
the existing scheme doesn't make it sensible to take the address of a
specific-data value.

New scheme is that the ThreadState structure carries not the table of
specifics, but merely a pointer to such.  This is allocated from the
client-side library, thus residing in client-visible memory and so
addresses can validlyh be taken.

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

23 years agoInitial stuff to make it work on Red Hat 8:
Julian Seward [Mon, 7 Oct 2002 23:56:55 +0000 (23:56 +0000)] 
Initial stuff to make it work on Red Hat 8:

- autoconf stuff for detecting glibc-2.3

- vg_libpthread_unimp.c: hack for __pthread_clock_[gs]ettime

- vg_libpthread.c: initialise thread's default locale by calling
  __uselocale(LC_GLOBAL_LOCALE) at the right time.  Gruesome.
  Also need to do this for new other threads - not yet done.

- cleanups -- don't use write() to write messages when bombing out,
  instead go direct to the syscalls.  Avoids nasty circularities
  with glibc initialisations.

MERGE TO STABLE

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

23 years agowhoops
Nicholas Nethercote [Mon, 7 Oct 2002 14:46:07 +0000 (14:46 +0000)] 
whoops

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

23 years agoAdded support for multi-skin suppressions, of the form:
Nicholas Nethercote [Mon, 7 Oct 2002 14:42:59 +0000 (14:42 +0000)] 
Added support for multi-skin suppressions, of the form:

  skin_name1,skin_name2:supp_name

No spaces are allowed on either side of the comma.

This is useful for sharing suppressions between Addrcheck and Memcheck.

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

23 years agosaneUInstr: define CCf correctly for FPU insns: they read no flags and
Julian Seward [Sun, 6 Oct 2002 21:43:50 +0000 (21:43 +0000)] 
saneUInstr: define CCf correctly for FPU insns: they read no flags and
write no flags (usually) or write ZCP (rarely, >= P6 only fast FPU compare
insns.)

up_UInstr: Put some 0x in %x fields so we can see what's hex.

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

23 years agostartup_segment_callback: don't panic when faced with non-executable,
Julian Seward [Sun, 6 Oct 2002 00:28:21 +0000 (00:28 +0000)] 
startup_segment_callback: don't panic when faced with non-executable,
non-readable, non-writable sections.  Just ignore them.  Comment in
the 1.0.X sources to the effect that this never happens is evidently a
lie.

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

23 years agoFix strange bug in matching AddrErrs.
Julian Seward [Sun, 6 Oct 2002 00:19:16 +0000 (00:19 +0000)] 
Fix strange bug in matching AddrErrs.

Nick, can you sanity-check this?

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

23 years agoSimplify assembler syntax for R H 6.2.
Julian Seward [Sun, 6 Oct 2002 00:08:57 +0000 (00:08 +0000)] 
Simplify assembler syntax for R H 6.2.

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

23 years agoMake suppressions work again after I messed with skin names. Sigh.
Julian Seward [Sat, 5 Oct 2002 16:49:09 +0000 (16:49 +0000)] 
Make suppressions work again after I messed with skin names.  Sigh.

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

23 years agoUnbreak make dist / make distcheck.
Julian Seward [Sat, 5 Oct 2002 16:19:56 +0000 (16:19 +0000)] 
Unbreak make dist / make distcheck.

Not sure if this is correct; Nick, can you verify?  Thx.

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

23 years agoNaming wibbles -- start skin names with a capital letter (they deserve it)
Julian Seward [Sat, 5 Oct 2002 15:49:27 +0000 (15:49 +0000)] 
Naming wibbles -- start skin names with a capital letter (they deserve it)

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

23 years ago--> 1.1.0 (yay!)
Julian Seward [Sat, 5 Oct 2002 15:34:55 +0000 (15:34 +0000)] 
--> 1.1.0 (yay!)

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

23 years agoprinting verbosity wibble
Julian Seward [Sat, 5 Oct 2002 15:34:38 +0000 (15:34 +0000)] 
printing verbosity wibble

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

23 years agoFix compile warnings
Julian Seward [Sat, 5 Oct 2002 15:28:29 +0000 (15:28 +0000)] 
Fix compile warnings

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

23 years agomodify_ldt nano-wibble
Julian Seward [Sat, 5 Oct 2002 15:23:17 +0000 (15:23 +0000)] 
modify_ldt nano-wibble

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

23 years ago__NR_modify_ldt: func=0x11 is also a kind of write
Julian Seward [Sat, 5 Oct 2002 15:22:29 +0000 (15:22 +0000)] 
__NR_modify_ldt: func=0x11 is also a kind of write

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

23 years agomerge revs
Julian Seward [Sat, 5 Oct 2002 15:18:27 +0000 (15:18 +0000)] 
merge revs
   vg_syscall_mem.c 1.58.2.8 and 1.58.2.10
   vg_unsafe.h 1.8.4.2

Support for __NR_ptrace, thanks to Jason Molenda.  Now valgrind can be
used to debug GDB.  Bwaha!

Kludge to work around the problem that the /usr/include/sys/user.h on
R H 6.2 doesn't define struct user_fpxregs_struct (problem appeared
with Jason Molenda's ptrace patch).

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

23 years agomerge rev 1.58.2.9:
Julian Seward [Sat, 5 Oct 2002 15:00:06 +0000 (15:00 +0000)] 
merge rev 1.58.2.9:

Support __NR_mount and __NR_umount.

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

23 years agomerge rev 1.58.2.7:
Julian Seward [Sat, 5 Oct 2002 14:52:27 +0000 (14:52 +0000)] 
merge rev 1.58.2.7:

Implement __NR_setresgid (170).

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

23 years agomerge rev 1.58.2.5:
Julian Seward [Sat, 5 Oct 2002 14:49:29 +0000 (14:49 +0000)] 
merge rev 1.58.2.5:

Implement TIOCLINUX (from Pavel Roskin <proski@gnu.org>).

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

23 years agomerge rev 1.29.2.6:
Julian Seward [Sat, 5 Oct 2002 14:42:39 +0000 (14:42 +0000)] 
merge rev 1.29.2.6:

Fix really stupid bug in REP SCAS<sz>.

Also (head only) add a bunch of asserts to guard against use of
seg override prefixes in conjunction with string ops; these are
not yet implemented.

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

23 years agomerge rev 1.29.2.7:
Julian Seward [Sat, 5 Oct 2002 14:36:26 +0000 (14:36 +0000)] 
merge rev 1.29.2.7:

Implement missing XCHG insns.

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

23 years agoImplement, and document, the --run-libc-freeres=no|yes flag.
Julian Seward [Sat, 5 Oct 2002 14:15:43 +0000 (14:15 +0000)] 
Implement, and document, the --run-libc-freeres=no|yes flag.

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

23 years agoBack out rev 1.9 (optimised %eflags save/restore). It isn't quite
Julian Seward [Sat, 5 Oct 2002 02:44:47 +0000 (02:44 +0000)] 
Back out rev 1.9 (optimised %eflags save/restore).  It isn't quite
right.

Here's a code sequence illustrating the problem.  The conditional jump
at the end evidently goes the wrong way sometimes, and the program
goes off into outer space soon after.

        0x4017F6F7:  addl %ebx,%ecx

          12: GETL      %ECX, t10
          13: ADDL      %EBX, t10  (-wOSZACP)
          14: PUTL      t10, %ECX
          15: INCEIPo   $2

        0x4017F6F9:  decl %eax

          16: GETL      %EAX, t12
          17: DECL      t12  (-wOSZAP)
          18: PUTL      t12, %EAX
          19: INCEIPo   $1

        0x4017F6FA:  jnb-8 0x4017F710

          20: Jnbo      $0x4017F710  (-rOSZACP)
          21: JMPo      $0x4017F6FC

Look carefully at the annotation on # 17.  Then look in the Intel docs
and see what flag(s) the Jnb (not-below) condition consults.  Bwaha!
It consults the carry flag.

The generated code for 17 (renamed to 12 after some NOP removal, I
guess) is

          12: DECL      %edx  (-wOSZAP)         [---d--]
                 42: 4A
                decl    %edx
                 43: 9C 8F 45 20
                pushfl ; popl 32(%ebp)

viz, we do the decl, and then copy the real machine's %eflags into
%EFLAGS.  Unfortunately this copies the real carry flag into the
simulated one, rather than leaving the simulated one alone.

So the principle is that it's only safe to omit the initial
%EFLAGS->%eflags move prior to the insn if the insn writes _all_ the
flags, and in this case it doesn't.

(after further consideration ...)

At first it seems tempting to play games with subset checks, ie if an
insn writes a _subset_ of the flags, we'd better copy sim'd to real
flags before the insn.

Problem with that is that the D (direction) flag, which specifies the
direction that rep-prefix string ops travel, is part of the "normal"
flag set.  So it is conceivable, although highly unlikely, that an app
could

- set the D flag
- do something like   ADD (-wOSZACP)
- use the D flag

then we'd still have to do an %EFLAGS->%eflags copy prior to the ADD,
in order to ensure the simulated D flag is preserved.

So it seems to me that it's pretty much impossible to preserve
absolute correctness and do any better than the vg_from_ucode.c rev
1.8 scheme.

Backing out rev 1.9.  We can just as easily restore it from cvs if a
better solution is arrived at.

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

23 years agowibbles
Nicholas Nethercote [Fri, 4 Oct 2002 15:30:48 +0000 (15:30 +0000)] 
wibbles

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

23 years agoFactorised some egregiously repetitive code.
Nicholas Nethercote [Fri, 4 Oct 2002 15:15:08 +0000 (15:15 +0000)] 
Factorised some egregiously repetitive code.

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

23 years agoMoved the following macros, which were defined multiple times in multiple
Nicholas Nethercote [Fri, 4 Oct 2002 14:34:15 +0000 (14:34 +0000)] 
Moved the following macros, which were defined multiple times in multiple
files, into vg_skin.h:

    uInstr0, uInstr1, uInstr2, uInstr3, nameIReg, nameISize, nameSReg,
    newTemp, newShadow, uLiteral, uCCall

As macros they avoid namespace problems (they expand to VG_(whatever)) so
this should work fine.

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

23 years agoMoved discard, clientperm and clientstackperm from tests/ into the test
Nicholas Nethercote [Fri, 4 Oct 2002 14:16:38 +0000 (14:16 +0000)] 
Moved discard, clientperm and clientstackperm from tests/ into the test
suite-proper, giving them .vgtest files and all that.  They don't make sense
for 1.0.X because the client request constants are different in HEAD, indeed
one of them (clientperm) fails with --stable.

Also moved blocked_syscall.c from tests/ to tests/unused/.

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

23 years ago*** empty log message ***
Nicholas Nethercote [Fri, 4 Oct 2002 11:43:11 +0000 (11:43 +0000)] 
*** empty log message ***

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

23 years agoAdded one regression test for each of addrcheck, lackey, and helgrind, each of
Nicholas Nethercote [Fri, 4 Oct 2002 11:35:47 +0000 (11:35 +0000)] 
Added one regression test for each of addrcheck, lackey, and helgrind, each of
which had none previously.  They all run tests/true (added as well), just to
automatically catch any total b0rkage errors.

Also fixed up filter_stderr_basic to account for changes to startup message;
my changes from yesterday broke all the --stable tests.

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

23 years agoRemove this which is causing valgrind/demangle/ to hang around like a zombie.
Nicholas Nethercote [Fri, 4 Oct 2002 11:33:02 +0000 (11:33 +0000)] 
Remove this which is causing valgrind/demangle/ to hang around like a zombie.

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

23 years agoAdded (untested) system call VG_(unlink)().
Nicholas Nethercote [Fri, 4 Oct 2002 10:29:38 +0000 (10:29 +0000)] 
Added (untested) system call VG_(unlink)().

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

23 years agoPrettified output somewhat, so that full directory names (relative to .) are
Nicholas Nethercote [Fri, 4 Oct 2002 10:03:34 +0000 (10:03 +0000)] 
Prettified output somewhat, so that full directory names (relative to .) are
printed, and so that directories containing no test files get a different, more
concise, message.

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

23 years agocomment wibbles
Nicholas Nethercote [Fri, 4 Oct 2002 09:22:30 +0000 (09:22 +0000)] 
comment wibbles

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

23 years agoAdded two pre_mem_write() calls that were missing; now all the
Nicholas Nethercote [Fri, 4 Oct 2002 09:18:09 +0000 (09:18 +0000)] 
Added two pre_mem_write() calls that were missing;  now all the
{pre,post}_mem_write() calls come in pairs as they should.

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

23 years agovg_to_ucode: deploy handleSegOverride() in a couple of places where an
Julian Seward [Thu, 3 Oct 2002 16:14:57 +0000 (16:14 +0000)] 
vg_to_ucode: deploy handleSegOverride() in a couple of places where an
address is calculated without use of disAMode.  This gets the NVidia GL
driver further along, till the point where it dies as a result of an
MMX/SSE insn :-(

vg_ldt.c: improve debug printing a bit

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

23 years agoChanged startup message to give information about skin and core separately.
Nicholas Nethercote [Thu, 3 Oct 2002 14:05:52 +0000 (14:05 +0000)] 
Changed startup message to give information about skin and core separately.
Added "version" and "copyright_author" fields for skins to supply.

Now startup message looks something like this:

==12698== cachegrind, an I1/D1/L2 cache profiler for x86-linux.
==12698== Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.
==12698== Built with valgrind-HEAD, a program execution monitor.
==12698== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==12698== Estimated CPU clock rate is 1422 MHz
==12698== For more details, rerun with: -v

The skin can specify a version number, but the skins that will be distributed
with Valgrind don't.

Also changed "x86 GNU/Linux" to the wicked "x86-linux" at Julian's request.

Updated default regression test filter to handle this new startup message.

----

Also moved the skin's name, description, etc., fields out of VG_(needs) into a
new struct VG_(details), since they are logically quite different to the needs.
Did a little code formatting, etc., for this.  Updated skin docs
correspondingly, too.

Also renamed the need `run_libc_freeres' --> `libc_freeres' so it's a noun
phrase rather than a verb phrase.

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

23 years agoAdded doc files for AddrCheck (but nothing in the docs).
Nicholas Nethercote [Thu, 3 Oct 2002 10:38:40 +0000 (10:38 +0000)] 
Added doc files for AddrCheck (but nothing in the docs).

Linked in new docs into the top-level docs index.

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

23 years agoAdded basic docs for Helgrind, Lackey, CoreCheck.
Nicholas Nethercote [Thu, 3 Oct 2002 10:07:34 +0000 (10:07 +0000)] 
Added basic docs for Helgrind, Lackey, CoreCheck.

Minor wibbles in AUTHORS.

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

23 years ago*** empty log message ***
Nicholas Nethercote [Thu, 3 Oct 2002 09:12:58 +0000 (09:12 +0000)] 
*** empty log message ***

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

23 years agoFixed stupid mistake. Fortunately the value is only used for initialisation
Nicholas Nethercote [Thu, 3 Oct 2002 08:57:01 +0000 (08:57 +0000)] 
Fixed stupid mistake.  Fortunately the value is only used for initialisation
and is then always overwritten by liveness analysis.  Still...

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

23 years agoAdded (brief!) docs for Nulgrind.
Nicholas Nethercote [Wed, 2 Oct 2002 13:49:13 +0000 (13:49 +0000)] 
Added (brief!) docs for Nulgrind.

Also fixed minor wibble tests/Makefile.am that was breaking 'make distcheck'.

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

23 years agoUpdated file descriptions in the copyright notices to reflect the core/skin
Nicholas Nethercote [Wed, 2 Oct 2002 13:26:35 +0000 (13:26 +0000)] 
Updated file descriptions in the copyright notices to reflect the core/skin
split.  Each skin now has its own two-line description.

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

23 years agoUpdated Cachegrind docs: you have to use "valgrind --skin=cachegrind" to run
Nicholas Nethercote [Wed, 2 Oct 2002 11:47:12 +0000 (11:47 +0000)] 
Updated Cachegrind docs:  you have to use "valgrind --skin=cachegrind" to run
it as the "cachegrind" script is now dead.

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

23 years agoChanges made so that skin error "report this bug to" messages are distinguished
Nicholas Nethercote [Wed, 2 Oct 2002 11:08:25 +0000 (11:08 +0000)] 
Changes made so that skin error "report this bug to" messages are distinguished
from core error ones:

  - Split up VG_(panic) into VG_(core_panic) and VG_(skin_panic)

  - Likewise, split vg_assert into vg_assert and sk_assert

  - Added a new need string: `bug_reports_to'

  - Removed VG_(skin_error) which was a previous wussy attempt at this change.
    This removed the need for the hacky redeclaration of VG_(skin_error) in
    vg_profile.c, which is good.

At the moment, Julian and Nick's email addresses are hard-coded into each skin
individually, rather than using a #define in vg_skin.h, because that didn't
feel quite right to me...  jseward@acm.org is still done with a #define for
core errors, though.

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

23 years agoQualifying suppression types with the skin name, like this:
Nicholas Nethercote [Wed, 2 Oct 2002 11:02:27 +0000 (11:02 +0000)] 
Qualifying suppression types with the skin name, like this:

  memcheck:Addr4

Changed the `name' need of the memcheck skin from "valgrind" to "memcheck" for
this.  But the name Valgrind will return when I print core and skin names in
the startup message.

One issue is that some skins share suppression types, eg. memcheck and
addrcheck.  Might be useful to allow multi-skin suppressions, viz:

  memcheck,addrcheck:Addr4

This won't be too hard to tack on, though.

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

23 years agoAdded seg_override test. Note this test fails on the 1.0.X branch (if you use
Nicholas Nethercote [Wed, 2 Oct 2002 10:36:46 +0000 (10:36 +0000)] 
Added seg_override test.  Note this test fails on the 1.0.X branch (if you use
the --stable option to the regression test script).

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

23 years agoFrom "Francis Lebourse" <flebourse@jetmultimedia.fr>:
Julian Seward [Wed, 2 Oct 2002 10:20:30 +0000 (10:20 +0000)] 
From "Francis Lebourse" <flebourse@jetmultimedia.fr>:

[re the ELF symbol reader]

This patch tries to exploit the dynamic symbols of a library if the
standard and debug symbols are missing.

This way, I avoid the "object doesn't have a symbol table message"
message and valgrind is able to print meaningful backtraces (else you
have only "in libsomelib.so"), even in the case of stripped libs.

Since the check of the .dynsym/.dynstr sections is done before the
.symtab/.strtab sections, the previous behavior is preseved for
unstripped libraries.

MERGE TO STABLE (if it doesn't cause probs with suppression files)

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

23 years agoupdate the libc_tsd stuff for R H limbo (glibc HEAD actually) and
Julian Seward [Wed, 2 Oct 2002 09:41:49 +0000 (09:41 +0000)] 
update the libc_tsd stuff for R H limbo (glibc HEAD actually) and
clean it up a bit

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

23 years agoMinor mods
Julian Seward [Wed, 2 Oct 2002 09:11:34 +0000 (09:11 +0000)] 
Minor mods

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