]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
21 years agoMove OINK from tool.h to pub_tool_libcprint.h.
Nicholas Nethercote [Sat, 11 Jun 2005 03:31:09 +0000 (03:31 +0000)] 
Move OINK from tool.h to pub_tool_libcprint.h.

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

21 years agoRemove the hard-coding of "_vgi_" as the intercept prefix in
Nicholas Nethercote [Sat, 11 Jun 2005 03:28:48 +0000 (03:28 +0000)] 
Remove the hard-coding of "_vgi_" as the intercept prefix in
vg_replace_malloc.c.

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

21 years agoHaving moved VG_(arena_strdup)() out of core.h, core.h no longer
Nicholas Nethercote [Sat, 11 Jun 2005 01:31:52 +0000 (01:31 +0000)] 
Having moved VG_(arena_strdup)() out of core.h, core.h no longer
needs to #include pub_core_mallocfree.h.  As a result, we need
to #include it explicitly everywhere else.

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

21 years agoAvoid compiler warnings.
Nicholas Nethercote [Sat, 11 Jun 2005 01:30:57 +0000 (01:30 +0000)] 
Avoid compiler warnings.

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

21 years agoAvoid compiler warnings.
Nicholas Nethercote [Sat, 11 Jun 2005 01:29:23 +0000 (01:29 +0000)] 
Avoid compiler warnings.

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

21 years agoMoved VG_(strdup)() and VG_(arena_strdup)() into m_mallocfree.
Nicholas Nethercote [Sat, 11 Jun 2005 01:12:08 +0000 (01:12 +0000)] 
Moved VG_(strdup)() and VG_(arena_strdup)() into m_mallocfree.

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

21 years agoModularised the thread/pthread modelling stuff.
Nicholas Nethercote [Sat, 11 Jun 2005 01:07:00 +0000 (01:07 +0000)] 
Modularised the thread/pthread modelling stuff.

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

21 years agoActually remove linux/core_os.h from the repository.
Nicholas Nethercote [Fri, 10 Jun 2005 23:19:35 +0000 (23:19 +0000)] 
Actually remove linux/core_os.h from the repository.

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

21 years agoRemove dead declaration.
Nicholas Nethercote [Fri, 10 Jun 2005 23:18:16 +0000 (23:18 +0000)] 
Remove dead declaration.

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

21 years agoMove two decls out of core.h into pub_core_syscalls.h where they belong.
Nicholas Nethercote [Fri, 10 Jun 2005 23:16:13 +0000 (23:16 +0000)] 
Move two decls out of core.h into pub_core_syscalls.h where they belong.

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

21 years agoKilled coregrind/$ARCH/core_arch.h. Moved the relevant pieces into core.h
Nicholas Nethercote [Fri, 10 Jun 2005 23:09:45 +0000 (23:09 +0000)] 
Killed coregrind/$ARCH/core_arch.h.  Moved the relevant pieces into core.h
for the moment.

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

21 years agoMoved various pieces of linux/core_os.c to the modules that use them.
Nicholas Nethercote [Fri, 10 Jun 2005 22:59:56 +0000 (22:59 +0000)] 
Moved various pieces of linux/core_os.c to the modules that use them.
Managed to kill linux/core_os.h, hooray.

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

21 years agoMoved VG_(fd_{hard,soft}_limit) into a better spot.
Nicholas Nethercote [Fri, 10 Jun 2005 22:39:04 +0000 (22:39 +0000)] 
Moved VG_(fd_{hard,soft}_limit) into a better spot.

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

21 years agoModularised signal libc stuff into m_libcsignal.
Nicholas Nethercote [Fri, 10 Jun 2005 22:08:14 +0000 (22:08 +0000)] 
Modularised signal libc stuff into m_libcsignal.

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

21 years agoRemoved unneeded headers.
Nicholas Nethercote [Fri, 10 Jun 2005 13:34:14 +0000 (13:34 +0000)] 
Removed unneeded headers.

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

21 years agoamd64: handle MOVUPS G to E
Julian Seward [Fri, 10 Jun 2005 11:04:52 +0000 (11:04 +0000)] 
amd64: handle MOVUPS G to E

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

21 years agoFix copy-n-paste error which could cause many syscalls to fail on amd64.
Julian Seward [Fri, 10 Jun 2005 10:40:48 +0000 (10:40 +0000)] 
Fix copy-n-paste error which could cause many syscalls to fail on amd64.

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

21 years agoClean up after m_syscalls changes: reinstate enough syscalls that
Julian Seward [Fri, 10 Jun 2005 10:27:55 +0000 (10:27 +0000)] 
Clean up after m_syscalls changes: reinstate enough syscalls that
memcheck/tests/x86/scalar works again.

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

21 years agoUpdate expected outputs.
Julian Seward [Fri, 10 Jun 2005 10:25:02 +0000 (10:25 +0000)] 
Update expected outputs.

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

21 years agoPut arch-specific Cachegrind code in files in the main cachegrind/
Nicholas Nethercote [Fri, 10 Jun 2005 04:46:19 +0000 (04:46 +0000)] 
Put arch-specific Cachegrind code in files in the main cachegrind/
directory, instead of subdirectories.  This is simpler and consistent
with how the rest of system is now structured.

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

21 years agoWhen printing XML, partially escape the output so that <, > and & in
Julian Seward [Thu, 9 Jun 2005 23:58:36 +0000 (23:58 +0000)] 
When printing XML, partially escape the output so that <, > and & in
C++ function names do not totally screw up XML parsers.

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

21 years agoHandle Clz64 and Ctz64.
Julian Seward [Thu, 9 Jun 2005 21:31:55 +0000 (21:31 +0000)] 
Handle Clz64 and Ctz64.

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

21 years agoDisable debugging printing. Duh.
Julian Seward [Thu, 9 Jun 2005 19:30:18 +0000 (19:30 +0000)] 
Disable debugging printing.  Duh.

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

21 years agoMore CFI-reader hacking. Thus far the reader has assumed that each
Julian Seward [Thu, 9 Jun 2005 19:27:25 +0000 (19:27 +0000)] 
More CFI-reader hacking.  Thus far the reader has assumed that each
FDE refers to the immediately preceding CIE, and gives up if that
isn't so.  Well, that isn't so, and this commit fixes it.  Now FDEs
may refer to CIEs seen arbitrarily far back.  This fixes some missing
stack traces on AMD64.

Also add some comments giving a top-level sketch of how the CFI reader
works.

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

21 years agoMove some #define-d constants into the VKI department, where I should
Julian Seward [Thu, 9 Jun 2005 14:17:47 +0000 (14:17 +0000)] 
Move some #define-d constants into the VKI department, where I should
have put them in the first place.

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

21 years agoIncrease the number of auxmaps from 500 to 20000. This should be
Julian Seward [Thu, 9 Jun 2005 13:56:07 +0000 (13:56 +0000)] 
Increase the number of auxmaps from 500 to 20000.  This should be
enough to cover 1.25GB of auxiliary address space.  This is all still
a hack until such time as the address space manager is rewritten, but
should make things work more reliably on amd64-linux for now.

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

21 years agoAlternate expected outputs with better stack traces. CFI based stack
Julian Seward [Thu, 9 Jun 2005 13:23:56 +0000 (13:23 +0000)] 
Alternate expected outputs with better stack traces.  CFI based stack
unwinding may have been a giant pain to implement, but it does appear
to be better at not missing stack frames and generally being
consistent then the old x86-linux follow-the-%ebp scheme.

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

21 years agoFix some socket-related functionality on amd64. This means file
Julian Seward [Thu, 9 Jun 2005 13:21:58 +0000 (13:21 +0000)] 
Fix some socket-related functionality on amd64.  This means file
descriptor leak checks now work on amd64.

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

21 years agoClean up after m_syscalls changes: unbreak amd64-linux.
Julian Seward [Thu, 9 Jun 2005 12:43:42 +0000 (12:43 +0000)] 
Clean up after m_syscalls changes: unbreak amd64-linux.

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

21 years agowibble
Julian Seward [Thu, 9 Jun 2005 09:18:01 +0000 (09:18 +0000)] 
wibble

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

21 years agoClean up after m_syscalls changes: reinstate about half the syscalls
Julian Seward [Wed, 8 Jun 2005 23:38:32 +0000 (23:38 +0000)] 
Clean up after m_syscalls changes: reinstate about half the syscalls
needed to make memcheck/tests/x86/scalar work again.

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

21 years agoClean up after m_syscalls changes: reinstate a bunch more (x86)
Julian Seward [Wed, 8 Jun 2005 10:46:56 +0000 (10:46 +0000)] 
Clean up after m_syscalls changes: reinstate a bunch more (x86)

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

21 years agoClean up after m_syscalls changes: reinstate enough syscalls (x86) to
Julian Seward [Wed, 8 Jun 2005 01:47:28 +0000 (01:47 +0000)] 
Clean up after m_syscalls changes: reinstate enough syscalls (x86) to
be able to run mozilla and OOo on LinuxThreads.

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

21 years agoClean up after m_syscalls changes: fix more NPTL ish syscalls (x86)
Julian Seward [Wed, 8 Jun 2005 01:01:48 +0000 (01:01 +0000)] 
Clean up after m_syscalls changes: fix more NPTL ish syscalls (x86)

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

21 years agoCleanup after m_syscalls changes: fix some NPTL ish syscalls (x86)
Julian Seward [Wed, 8 Jun 2005 00:02:49 +0000 (00:02 +0000)] 
Cleanup after m_syscalls changes: fix some NPTL ish syscalls (x86)

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

21 years agoA major overhaul of all machinery to do with syscalls, but mostly of
Julian Seward [Tue, 7 Jun 2005 20:04:56 +0000 (20:04 +0000)] 
A major overhaul of all machinery to do with syscalls, but mostly of
the m_syscalls module.  Fundamentally the aim of the overhaul is to
clean up the logic and abstractions surrounding syscalls in order that
we can cleanly support ppc32 and other new targets.  Aims in detail:

* To further decouple the syscall PRE/POST wrappers from specifics of
  how those values are stored on a given platform.  The wrappers look
  the same as they did before, mostly (eg, references to ARGn and
  RES are unchanged), but now those macros refer to values in structs
  SyscallArgs and SyscallStatus (see priv_types_n_macros.h).

* Complete overhaul of the driver logic for syscalls.  The resulting
  logic is algorithmically identical to what we had before, but is
  more documented, and deals with moving arg/result data between
  platform specific representations and the canonical forms in
  structs SyscallArgs and SyscallStatus.

* Also as a result of this change, remove problems in the old logic
  due to assignments of RES in PRE wrappers trashing the ARGs whilst
  we still need to see them.

* Lots of other cleanups and documentation.  There is extensive
  commentary in syscalls-main.c.

The driver logic has been placed in its own file, syscalls-main.c.

New/deleted files in m_syscalls:

* syscalls.c is divided up into syscalls-main.c, containing driver
  logic, and syscalls-generic.c, containing generic Unix wrappers.

* priv_syscalls.h is chopped up into priv_types_n_macros.h
  and priv_syscalls-{generic,main}.h.

                           ------------

All the above changes are in m_syscalls.  However there is one
system-wide change as a result of all this.

The x86-linux assumption that syscall return values in the range -4095
.. -1 are errors and all others are values, has been done away with
everywhere.  Instead there is a new basic type SysRes which holds a
system call result in a platform-neutral way.

Everywhere that previously an Int would have held a system call
result, there is now a SysRes in its place.

                           ------------

Almost everything works on SuSE 9.1 (LinuxThreads) again.  NPTL will
still be majorly broken; I will commit fixes shortly.  AMD64 is also
totalled.  I will get to that too.

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

21 years agogcc-3.0.4 (x86) doesn't understand -m32, so autoconfiscate it
Julian Seward [Sat, 4 Jun 2005 23:14:53 +0000 (23:14 +0000)] 
gcc-3.0.4 (x86) doesn't understand -m32, so autoconfiscate it

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

21 years agogcc-3.0.4 build fix.
Julian Seward [Sat, 4 Jun 2005 23:13:46 +0000 (23:13 +0000)] 
gcc-3.0.4 build fix.

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

21 years agoImplement stack registration client requests. See the documentation
Robert Walsh [Sat, 4 Jun 2005 20:42:33 +0000 (20:42 +0000)] 
Implement stack registration client requests.  See the documentation
in the user manual for usage information.  The stack_changes.c file in
corecheck/tests contains a short example.

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

21 years agoUpdate ignores.
Robert Walsh [Sat, 4 Jun 2005 20:33:51 +0000 (20:33 +0000)] 
Update ignores.

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

21 years agoModularised file and socket libc stuff in m_libcfile.
Nicholas Nethercote [Sat, 4 Jun 2005 20:03:55 +0000 (20:03 +0000)] 
Modularised file and socket libc stuff in m_libcfile.

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

21 years agoUpdate ignores.
Robert Walsh [Sat, 4 Jun 2005 19:36:34 +0000 (19:36 +0000)] 
Update ignores.

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

21 years agoModularised assertions and panics in m_libcassert.
Nicholas Nethercote [Sat, 4 Jun 2005 19:16:06 +0000 (19:16 +0000)] 
Modularised assertions and panics in m_libcassert.

As part of this, killed the VG_STRINGIFY macro, which was used to expand
out names like "VG_(foo)" and "vgPlain_foo" in assertion failure
messages.  This is good since we actually want the "VG_(foo)" form used
in these messages.

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

21 years agowhoops, add this
Nicholas Nethercote [Fri, 3 Jun 2005 13:21:18 +0000 (13:21 +0000)] 
whoops, add this

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

21 years agoModularise printing functions in m_libcprint.
Nicholas Nethercote [Fri, 3 Jun 2005 03:08:39 +0000 (03:08 +0000)] 
Modularise printing functions in m_libcprint.

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

21 years agoRename *ROUND* as VG_*ROUND* to be consistent with everything else. Also
Nicholas Nethercote [Thu, 2 Jun 2005 03:52:53 +0000 (03:52 +0000)] 
Rename *ROUND* as VG_*ROUND* to be consistent with everything else.  Also
make them tool-visible, so that Memcheck and Helgrind don't have to defined
their own versions!

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

21 years agoStarted modularising vg_mylibc. Put all the standalone stuff -- ie. not
Nicholas Nethercote [Thu, 2 Jun 2005 03:39:33 +0000 (03:39 +0000)] 
Started modularising vg_mylibc.  Put all the standalone stuff -- ie. not
relying on any other modules -- in m_libcbase.

Also converted the 'size' parameters to functions like VG_(memcpy) and
VG_(strncpy) from Int to SizeT, as they should be.

Also removed VG_(atoll16) and VG_(toupper), which weren't being used.

Also made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need.  As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any number containing the digits 'A'..'I'!
(Eg. for "A; it would return 17 instead of 10!)

Had to disable the assertions in VG_(string_match), since this module can't
see vg_assert, which wasn't ideal but also isn't a disaster.

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

21 years agoMinor refinements/bug-fixes to XML printing.
Julian Seward [Wed, 1 Jun 2005 17:35:23 +0000 (17:35 +0000)] 
Minor refinements/bug-fixes to XML printing.

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

21 years agoRemove dead macro.
Nicholas Nethercote [Wed, 1 Jun 2005 04:07:56 +0000 (04:07 +0000)] 
Remove dead macro.

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

21 years agoMove VALGRINDCLO and VALGRINDOPTS into m_options.
Nicholas Nethercote [Wed, 1 Jun 2005 04:06:55 +0000 (04:06 +0000)] 
Move VALGRINDCLO and VALGRINDOPTS into m_options.

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

21 years agoMoved VGA_(pointercheck)() into ASpaceMgr.
Nicholas Nethercote [Wed, 1 Jun 2005 03:48:33 +0000 (03:48 +0000)] 
Moved VGA_(pointercheck)() into ASpaceMgr.

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

21 years agoModularised the profiling stuff as m_profile.c. It's much more
Nicholas Nethercote [Wed, 1 Jun 2005 03:09:59 +0000 (03:09 +0000)] 
Modularised the profiling stuff as m_profile.c.  It's much more
sensible now -- no vg_dummy_profile.c, no silly #including of
vg_profile.c from tools.

Unfortunately, it still doesn't work, due to bad interactions
with signal handling that I don't understand.

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

21 years agoWhitespace/comment-only changes, to serve as placeholder for the last commit
Nicholas Nethercote [Wed, 1 Jun 2005 00:03:17 +0000 (00:03 +0000)] 
Whitespace/comment-only changes, to serve as placeholder for the last commit
which I put the wrong log message in for.  The log message should have been:

  Clean up VG_(core_panic_at)() -- pass it ip/sp/fp rather than a
  StackTrace.  This allows m_signals.c to not have to know about
  m_stacktrace.c, nor does core.h need to import pub_core_stacktrace.h any
  more.  (Also fixed a bug that was preventing vg_assert2's extra string
  from being printed.)

  Also moved VG_DEEPEST_BACKTRACE out of core.h into pub_core_execontext.h.

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

21 years agoModularised vg_signals.c as m_signals.c.
Nicholas Nethercote [Wed, 1 Jun 2005 00:00:46 +0000 (00:00 +0000)] 
Modularised vg_signals.c as m_signals.c.

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

21 years agoTest commit, whitespace change only.
Nicholas Nethercote [Tue, 31 May 2005 22:15:14 +0000 (22:15 +0000)] 
Test commit, whitespace change only.

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

21 years agoUpdate ignore stuff.
Robert Walsh [Tue, 31 May 2005 21:21:12 +0000 (21:21 +0000)] 
Update ignore stuff.

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

21 years agoSuSE 9.3 (x86) fix (sigh)
Julian Seward [Tue, 31 May 2005 21:07:01 +0000 (21:07 +0000)] 
SuSE 9.3 (x86) fix (sigh)

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

21 years agoMore expected outputs for FC4.
Julian Seward [Tue, 31 May 2005 20:01:34 +0000 (20:01 +0000)] 
More expected outputs for FC4.

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

21 years agoExpected outputs on Fedora Core 4.
Julian Seward [Tue, 31 May 2005 19:49:28 +0000 (19:49 +0000)] 
Expected outputs on Fedora Core 4.

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

21 years agoCompletely zero out all the thread records at initialisation. As far
Julian Seward [Tue, 31 May 2005 17:24:49 +0000 (17:24 +0000)] 
Completely zero out all the thread records at initialisation.  As far
as I can see, deallocate_LGDTs_for_thread were being called on
uninitialised thread records.

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

21 years agoUnbreak amd64 build.
Julian Seward [Tue, 31 May 2005 15:41:42 +0000 (15:41 +0000)] 
Unbreak amd64 build.

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

21 years agoAt clone(), always start the child off with a copy of the parent's GDT.
Julian Seward [Tue, 31 May 2005 13:08:03 +0000 (13:08 +0000)] 
At clone(), always start the child off with a copy of the parent's GDT.

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

21 years agoWhen handling the clone variant done by the Quadrics Elan3 user-space
Julian Seward [Tue, 31 May 2005 10:12:06 +0000 (10:12 +0000)] 
When handling the clone variant done by the Quadrics Elan3 user-space
driver, start the child off with a copy of the parent's GDT.  All
other uses of clone() are unaffected.

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

21 years agoModularised all the debug info stuff as m_debuginfo/. It's a mess
Nicholas Nethercote [Tue, 31 May 2005 02:38:09 +0000 (02:38 +0000)] 
Modularised all the debug info stuff as m_debuginfo/.  It's a mess
and needs further cleaning up, but it's a start.

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

21 years agoModularised vg_signals.c as m_signals.c.
Nicholas Nethercote [Tue, 31 May 2005 01:00:08 +0000 (01:00 +0000)] 
Modularised vg_signals.c as m_signals.c.

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

21 years agoModularised vg_main.c as m_main.c. Moved some stuff out of it to reduce the
Nicholas Nethercote [Tue, 31 May 2005 00:23:43 +0000 (00:23 +0000)] 
Modularised vg_main.c as m_main.c.  Moved some stuff out of it to reduce the
number of files that depend on it, but there are still some which should be
removed in the future.

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

21 years agodebug-logging (-d) totally didn't work when one Valgrindified process
Julian Seward [Mon, 30 May 2005 23:52:47 +0000 (23:52 +0000)] 
debug-logging (-d) totally didn't work when one Valgrindified process
exec's another.  This commit fixes it.

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

21 years agoModularised m_scheduler.
Nicholas Nethercote [Mon, 30 May 2005 23:20:51 +0000 (23:20 +0000)] 
Modularised m_scheduler.

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

21 years agoChange the way thread termination is handled. Until now, there has
Julian Seward [Mon, 30 May 2005 21:44:08 +0000 (21:44 +0000)] 
Change the way thread termination is handled.  Until now, there has
been a concept of a 'master thread'.  This is the first thread in the
process.  There was special logic which kept the master thread alive
artificially should it attempt to exit before its children.  So the
master would wait for all children to exit and then exit itself, in
the process emitting the final summary of errors, leaks, etc.

This has the advantage that any process waiting on this one will see
the final summaries appearing before its sys_wait call returns.  In
other words, the final summary output is synchronous with the
master-thread exiting.

Unfortunately the master-thread idea has a serious drawback, namely
that it can and sometimes does cause threaded programs to deadlock at
exit.  It introduces an artificial dependency which is that the master
thread cannot really exit until all its children have exited.  If --
by any means at all -- the children are waiting for the master to exit
before exiting themselves, deadlock results.  There are now two known
examples of such deadlocks.

This commit removes the master thread concept and lets threads exit in
the order which they would have exited without Valgrind's involvement.
The last thread to exit prints the final summaries.  This has the
disadvantage that final output may appear arbitrarily later relative
to the exit of the initial thread.  Whether this is a problem in
practice remains to be seen.

As a minor side effect of this change, some functions have had
_NORETURN added to their names.  Such functions do not return.  The
thread in which they execute is guaranteed to exit before they return.
This makes the logic somewhat easier to follow.

amd64 compilation is now broken.  I will fix it shortly.

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

21 years agoApparently someone somewhere in some obscure library deep in the
Julian Seward [Mon, 30 May 2005 11:19:54 +0000 (11:19 +0000)] 
Apparently someone somewhere in some obscure library deep in the
basement of mozilla requires 'lods'.

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

21 years agoUnbreak AMD64 compilation.
Nicholas Nethercote [Mon, 30 May 2005 03:12:09 +0000 (03:12 +0000)] 
Unbreak AMD64 compilation.

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

21 years agoRenamed the $PLATFORM/vki_unistd.h files as vki_unistd-$PLATFORM.h, to
Nicholas Nethercote [Sun, 29 May 2005 23:30:48 +0000 (23:30 +0000)] 
Renamed the $PLATFORM/vki_unistd.h files as vki_unistd-$PLATFORM.h, to
match the headers files in include/.

As a consequence, coregrind/$PLATFORM directories are no longer needed,
hooray!

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

21 years agoEliminated VGP_DO_MMAP. Replaced it with VG_(mmap_native)(), which was
Nicholas Nethercote [Sun, 29 May 2005 18:46:38 +0000 (18:46 +0000)] 
Eliminated VGP_DO_MMAP.  Replaced it with VG_(mmap_native)(), which was
derived from mmap_inner().

As a consequence, $PLATFORM/core_platform.h files are no longer necessary,
hooray!

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

21 years agoLocalized use of VGP_UCONTEXT_* to vg_signals.c, which meant they could
Nicholas Nethercote [Sun, 29 May 2005 17:50:40 +0000 (17:50 +0000)] 
Localized use of VGP_UCONTEXT_* to vg_signals.c, which meant they could
be moved out of $PLATFORM/core_platform.h.

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

21 years agoEliminate VGP_GET_MMAP_ARGS.
Nicholas Nethercote [Sun, 29 May 2005 17:27:18 +0000 (17:27 +0000)] 
Eliminate VGP_GET_MMAP_ARGS.

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

21 years agoRemove unused file.
Nicholas Nethercote [Sun, 29 May 2005 17:05:49 +0000 (17:05 +0000)] 
Remove unused file.

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

21 years agoForgot to add pub_core_redir.h when committing the m_redir module.
Nicholas Nethercote [Sun, 29 May 2005 17:03:54 +0000 (17:03 +0000)] 
Forgot to add pub_core_redir.h when committing the m_redir module.

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

21 years agoModularised m_redir. As a side-effect, managed to remove
Nicholas Nethercote [Sun, 29 May 2005 17:01:48 +0000 (17:01 +0000)] 
Modularised m_redir.  As a side-effect, managed to remove
$PLATFORM/core_platform.c and $PLATFORM/libplatform.a, hooray.

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

21 years agoRemove remnants of the futex-based semaphore implementation.
Nicholas Nethercote [Sun, 29 May 2005 16:23:17 +0000 (16:23 +0000)] 
Remove remnants of the futex-based semaphore implementation.

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

21 years agoRemoved the unused futex-based semaphore implementation. It can be
Nicholas Nethercote [Sun, 29 May 2005 16:05:37 +0000 (16:05 +0000)] 
Removed the unused futex-based semaphore implementation.  It can be
added back in later if necessary.

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

21 years agoAvoid confusing use of a pointer before checking it it's NULL. (The
Nicholas Nethercote [Wed, 25 May 2005 21:30:05 +0000 (21:30 +0000)] 
Avoid confusing use of a pointer before checking it it's NULL.  (The
code from the glibc demangler is buggy, but because we use a malloc()
that never returns NULL, this code is actually ok within Valgrind, albeit
strange.  I changed it to avoid possible confusion.)

Reported by Madhu Kurup.

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

21 years agoAvoid possible array overflow. Reported by Madhu Kurup.
Nicholas Nethercote [Wed, 25 May 2005 21:26:35 +0000 (21:26 +0000)] 
Avoid possible array overflow.  Reported by Madhu Kurup.

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

21 years agoComment-only changes: fix a typo, clarify another comment.
Nicholas Nethercote [Wed, 25 May 2005 15:52:39 +0000 (15:52 +0000)] 
Comment-only changes: fix a typo, clarify another comment.

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

21 years agoHandle fnclex, needed by g95.
Julian Seward [Wed, 25 May 2005 00:44:13 +0000 (00:44 +0000)] 
Handle fnclex, needed by g95.

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

21 years agoRemove out-of-date comment.
Nicholas Nethercote [Tue, 24 May 2005 21:43:26 +0000 (21:43 +0000)] 
Remove out-of-date comment.

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

21 years agoSpotted by Madhu Kurup: don't leak memory.
Nicholas Nethercote [Tue, 24 May 2005 21:36:32 +0000 (21:36 +0000)] 
Spotted by Madhu Kurup:  don't leak memory.

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

21 years agoFix error found by Madhu Kurup:
Nicholas Nethercote [Tue, 24 May 2005 21:28:54 +0000 (21:28 +0000)] 
Fix error found by Madhu Kurup:

  Loop overrun occurs as the i+1 value is being processed. A code path
  exists where i can be uninitialized but incremented (line 1082).

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

21 years agoAll other checks with VG_N_THREADS are <, except this one.
Nicholas Nethercote [Tue, 24 May 2005 20:07:20 +0000 (20:07 +0000)] 
All other checks with VG_N_THREADS are <, except this one.
(From Madhu Kurup.)

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

21 years agoamd64-linux output
Julian Seward [Tue, 24 May 2005 15:09:14 +0000 (15:09 +0000)] 
amd64-linux output

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

21 years agoMore XML output futzing.
Julian Seward [Tue, 24 May 2005 15:00:55 +0000 (15:00 +0000)] 
More XML output futzing.

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

21 years agoTest XML output.
Julian Seward [Tue, 24 May 2005 14:46:02 +0000 (14:46 +0000)] 
Test XML output.

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

21 years agoAdd in some missing files.
Julian Seward [Tue, 24 May 2005 14:23:10 +0000 (14:23 +0000)] 
Add in some missing files.

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

21 years agoXML output futzing-around-with.
Julian Seward [Tue, 24 May 2005 14:21:45 +0000 (14:21 +0000)] 
XML output futzing-around-with.

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

21 years agoDocumentation on the new XML output facility and format.
Julian Seward [Tue, 24 May 2005 14:17:41 +0000 (14:17 +0000)] 
Documentation on the new XML output facility and format.

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

21 years agoUse longs to get the error counts as valgrind will expect to return a
Tom Hughes [Tue, 24 May 2005 07:22:13 +0000 (07:22 +0000)] 
Use longs to get the error counts as valgrind will expect to return a
machine word. Based on diagnosis by Robert Walsh <rjwalsh@durables.org>.

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

21 years agoUse EOL as the termination condition so that we terminate correctly
Tom Hughes [Tue, 24 May 2005 07:21:22 +0000 (07:21 +0000)] 
Use EOL as the termination condition so that we terminate correctly
on 64 bit systems. Patch from Robert Walsh <rjwalsh@durables.org>.

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

21 years agoXML printing wibbles. And add missing braces around the then-part of
Julian Seward [Mon, 23 May 2005 14:47:52 +0000 (14:47 +0000)] 
XML printing wibbles.  And add missing braces around the then-part of
one of the if-s.

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

21 years agoAnother possible output.
Julian Seward [Mon, 23 May 2005 14:24:30 +0000 (14:24 +0000)] 
Another possible output.

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

21 years agoMore possible outputs
Julian Seward [Mon, 23 May 2005 14:22:26 +0000 (14:22 +0000)] 
More possible outputs

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

21 years agoMore possible outputs.
Julian Seward [Mon, 23 May 2005 14:18:24 +0000 (14:18 +0000)] 
More possible outputs.

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