1702 Commits

Author SHA1 Message Date
Nicholas Nethercote
d5717b3e8c The two patches attached resolve the exit-hang (of OOo) bug for me. The first
fixes getppid(), and the second fixes the next bug which is revealed
once getppid() does what LinuxThreads wants;  LinuxThreads uses SIGKILL
to kill off stray threads, but if we send naked SIGKILLs to Valgrind
threads, they'll die without cleaning up or informing anyone of their
death, which means that they're waited on forever. 

ADAPTED FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3449
2005-03-26 20:08:06 +00:00
Nicholas Nethercote
f385afbb5c sys_futex's FUTEX_(CMP_)REQUEUE requests use the futex2 pointer (not
timeout); FUTEX_CMP_REQUEUE also uses the timespec pointer as an integer.       
                                                                                
Also, more clearly document the argument usages, and make the per-operation     
special cases clearer.             

MERGED FROM CVS HEAD


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3447
2005-03-26 16:44:19 +00:00
Nicholas Nethercote
32dd4093dc Handle a couple kinds of executable mutation: a read-only bss, and a
zero-length segment.           

MERGED FROM CVS HEAD


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3446
2005-03-26 16:22:43 +00:00
Nicholas Nethercote
23f4ba44cd Skip a stab if it has no ':' at all.
MERGED FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3445
2005-03-26 16:10:49 +00:00
Julian Seward
64824ad318 More amd64 signal handling fixes (Tom Hughes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3443
2005-03-26 13:48:19 +00:00
Julian Seward
c5dc229747 Unbreak amd64 build. We need to have an overnight autobuild running
on amd64 asap.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3441
2005-03-26 13:33:27 +00:00
Nicholas Nethercote
425c86253b Remove unneeded vg_intercept.c.base, which was still hanging around from the
CVS/SVN merge.  Also removed a reference to it in vg_replace_malloc.c.base.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3440
2005-03-26 04:20:04 +00:00
Nicholas Nethercote
ce81b52a84 Make our VG_(isspace)() match libc's isspace(). And remove ISSPACE and
VG_ISSPACE, replacing them with calls to VG_(isspace)().



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3439
2005-03-26 04:14:01 +00:00
Nicholas Nethercote
bb4598350e Obsoleted three client requests that were still hanging around from the old
libpthread implementation: USERREQ__READ_MILLISECOND_TIMER, USERREQ__MALLOC,
USERREQ__FREE.

As a consequence, all the PTHREQ macros (eg. VGA_PTHREQ_RET,
SET_PTHREQ_RETVAL) could be removed.  And VG_(tl_malloc_called_by_scheduler)
has been renamed VG_(tl_malloc_called_deliberately) to reflect how its role
has changed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3438
2005-03-26 03:50:14 +00:00
Nicholas Nethercote
b08a041b56 Use "VGO_" prefix for various OS-specific exports.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3437
2005-03-26 02:57:36 +00:00
Nicholas Nethercote
8853545f0f Use VGP_ prefix more consistently for platform-specific exports.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3436
2005-03-26 02:42:31 +00:00
Nicholas Nethercote
27066dbfc5 Don't use the VGP_ for profiling any more, just use VG_ -- we want to use
VGP_ for platform-specific things.  



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3435
2005-03-26 00:42:02 +00:00
Nicholas Nethercote
66b2b7d5ad Use "VGA_" prefix more consistently.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3434
2005-03-26 00:32:29 +00:00
Nicholas Nethercote
cb6c8b4bd2 Use "VGA_" prefix more consistently for arch-specific things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3433
2005-03-26 00:18:45 +00:00
Nicholas Nethercote
0f0863110d Rename some arch-specific macros to use the more consistent "VGA_" prefix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3432
2005-03-26 00:04:03 +00:00
Nicholas Nethercote
ff514fd09b Rename M_VG_ERRTXT as VG_ERRTXT_LEN, which is more consistent with other
names.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3430
2005-03-25 23:47:16 +00:00
Nicholas Nethercote
f474d2e51a A modularisation + refactoring commit. vg_execontext.c has been split into
two halves: stacktrace.c, which deals with getting, traversing and printing
stack traces;  and execontext.c, which deals with storing stack traces
permanently in a way that avoids duplicates, and comparing them.

One nice outcome:  previously we were often creating ExeContexts, which live
forever, even when they were only needed temporarily.  Ie. this was a memory
leak, which has been removed.

As part of this, new headers have been created, carved off core.h and
tool.h.  Lots of function names have changed, too.

In Massif, I also changed a lot of "eip" names to "ip" to make them less
x86-specific.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3429
2005-03-25 23:35:48 +00:00
Julian Seward
2f61b2f293 setup_pointercheck(): be silent
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3428
2005-03-24 20:38:24 +00:00
Julian Seward
7e67ae71fd Initial get-threads-working patch (Tom Hughes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3427
2005-03-24 19:38:57 +00:00
Julian Seward
43e6c44681 Various amd64 syscall improvements (Tom Hughes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3425
2005-03-24 17:52:02 +00:00
Julian Seward
cd44efd2cf A first cut at amd64 signal frame build/unbuild, from Tom Hughes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3424
2005-03-24 17:48:02 +00:00
Nicholas Nethercote
16f9a077c7 Avoid numerous compiler warnings by being more precise with REGPARM
attributes in declarations.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3421
2005-03-24 04:40:08 +00:00
Nicholas Nethercote
b15d9cae1a Track recent Vex change, in order to remove a compile warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3419
2005-03-24 04:35:11 +00:00
Nicholas Nethercote
70d6b30002 Avoid GCC warnings by adding necessary declarations for non-static
functions.

Also, renamed VALGRIND_INTERNAL_PRINTF() and internal_printf().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3418
2005-03-24 04:15:44 +00:00
Julian Seward
42bce07a58 More syscall fixes (Tom Hughes).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3411
2005-03-23 11:41:15 +00:00
Julian Seward
0d46389ab0 Fix a bunch of amd64 syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3410
2005-03-23 03:42:26 +00:00
Julian Seward
8366aee7e1 64-bit cleanness fix for command-line printing
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3409
2005-03-23 03:06:30 +00:00
Julian Seward
f8682ee14f PRE_(mmap2) and PRE(old_mmap): if not MAP_FIXED but addr != 0, don't
fail if we can't get addr; instead get something arbitrary.  This is
what SUSv3 requires.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3408
2005-03-23 02:53:13 +00:00
Nicholas Nethercote
e65bcc8d43 make function names more uniform
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3406
2005-03-22 04:02:43 +00:00
Julian Seward
e964515010 Remove debug printing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3404
2005-03-22 02:29:22 +00:00
Julian Seward
10d241c300 Finally finish pissing around with jmp_with_stack. Now at least we
can get a startup on amd64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3403
2005-03-22 02:03:09 +00:00
Julian Seward
9d7b4d9ae2 Mucho buggering about jmp_with_stack and its kin. Jeez. Now the
amd64 version is broken again.  Writing code with undocumented
assumptions should be a firable offense.  At the very least.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3402
2005-03-22 01:55:35 +00:00
Julian Seward
28650c3aa0 jmp_with_stack is a hack which makes no sense on archs which pass args
in registers.  Replace it (for amd64) with something more disciplined:
call_on_new_stack_0_0 and call_on_new_stack_0_1.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3401
2005-03-22 00:19:55 +00:00
Julian Seward
d156fe938e Horrible syscall-related hacks to make it at least compile on amd64.
Doesn't work yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3400
2005-03-21 17:43:34 +00:00
Julian Seward
cfdf00d9bd Track Vex API change in rev 1062: pass both the guest and host word
sizes to the instrumentatation functions.  Make most of the tools
abort if they are not the same; we can't handle that case yet.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3397
2005-03-21 00:55:49 +00:00
Nicholas Nethercote
91f14c659b Move VG_(get_EIP)() out of vg_execontext.c, where it doesn't belong, into
vg_main.c, where it doesn't also really belong but at least it's now next to
VG_(get_stack_pointer)() which is very similar.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3395
2005-03-21 00:01:36 +00:00
Nicholas Nethercote
f94393fec0 This commit partly cleans up and modularises ExeContext usage. It doesn't
look like that much, but it's a good first step;  there's more to come.

- vg_errcontext.c:gen_suppressions() and vg_symtab2.c:VG_(mini_stack_dump)()
  had very similar stack-trace-traversing loops.  I factored these out into
  the higher-order function VG_(apply_ExeContext)().  I put this into
  vg_execontext.c, which is the obvious spot.  This is good because before
  this change we had two functions, neither in vg_execontext.c, which were
  crawling all over ExeContexts -- they shouldn't have to do that.
  
- Removed VG_(mini_stack_dump)(), which was almost identical to
  VG_(pp_ExeContext)().

- Removed dead function VG_(get_EIP_from_ExeContext)().

- Replaced a call to VG_(get_ExeContext2)() with the simpler
  VG_(get_ExeContext)() in vg_scheduler.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3394
2005-03-20 23:45:36 +00:00
Julian Seward
753b8dcf94 Track minor Vex API changes that occurred in Vex rev 1059.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3393
2005-03-20 18:55:15 +00:00
Nicholas Nethercote
72815ff071 Comment-only change -- replace old function name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3392
2005-03-20 18:23:11 +00:00
Nicholas Nethercote
404d5824be Print messages only shown with -v using Vg_DebugMsg, rather than Vg_UserMsg.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3391
2005-03-20 18:21:14 +00:00
Julian Seward
b7761ebdb4 Don't show VEX emulation warnings by default; they are just too tiresome.
If you want to see them, use --show-emwarns=yes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3387
2005-03-19 15:12:21 +00:00
Julian Seward
85ab724e17 Update VG_(bbs_done) correctly, so it agrees with the BB counts
presented by Lackey.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3386
2005-03-18 03:18:30 +00:00
Julian Seward
8a5c020b4f Fix VG_({un}pad_address_space) so as to make sys_io_setup work again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3383
2005-03-17 02:14:44 +00:00
Julian Seward
3f507c5e4e Fill in a bunch of amd64-specific crud. Still won't link though.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3382
2005-03-16 22:04:40 +00:00
Julian Seward
c97c70dfff Reinstate VG_(find_root_memory). This makes the leak detector work
again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3377
2005-03-16 12:27:53 +00:00
Julian Seward
f6401271ca Get rid of VG_(client_free) as it was never used. Rename its
counterpart VG_(client_alloc) to VG_(get_memory_from_mmap_for_client).
Man, this low level memory management is an undisciplined mess.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3376
2005-03-16 12:11:12 +00:00
Nicholas Nethercote
f56f07bb16 Don't try to stuff 16 bit values into 12 bit variables.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3374
2005-03-16 04:09:21 +00:00
Nicholas Nethercote
e2642f020a Replace an 8-line macro with a 2-line function that is also easier to
understand.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3373
2005-03-16 03:49:59 +00:00
Julian Seward
f1dfcb9521 Stop sys_sigprocmask from dying with assertion failures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3368
2005-03-16 00:40:48 +00:00
Julian Seward
d5e926ab38 Allow mmaps etc all the way down to zero. This 'fixes' as_mmap.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3366
2005-03-15 23:29:13 +00:00