]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
22 years agoFix minor cut+paste error.
Nicholas Nethercote [Mon, 29 Sep 2003 12:58:37 +0000 (12:58 +0000)] 
Fix minor cut+paste error.

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

22 years agorevert accidental debug code I committed last time.
Dirk Mueller [Mon, 29 Sep 2003 10:56:24 +0000 (10:56 +0000)] 
revert accidental debug code I committed last time.

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

22 years agoFixed the static-link check at startup -- it was broken for scripts. Refine
Nicholas Nethercote [Sun, 28 Sep 2003 18:18:47 +0000 (18:18 +0000)] 
Fixed the static-link check at startup -- it was broken for scripts.  Refine
FAQ #5 accordingly.

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

22 years agoIncrease size of block-tracking hash table(s) from 997 to 4999.
Julian Seward [Sun, 28 Sep 2003 16:32:58 +0000 (16:32 +0000)] 
Increase size of block-tracking hash table(s) from 997 to 4999.

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

22 years agoAdd a suppression for stack underrun bug(s) in the c++ support library
Julian Seward [Sat, 27 Sep 2003 21:25:30 +0000 (21:25 +0000)] 
Add a suppression for stack underrun bug(s) in the c++ support library
distributed with Intel Icc 7.0.
(/opt/intel/compiler70/ia32/lib/libcxa.so.3)

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

22 years agoimplement IN and OUT opcodes.
Dirk Mueller [Sat, 27 Sep 2003 20:15:01 +0000 (20:15 +0000)] 
implement IN and OUT opcodes.

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

22 years agoRemove extraneous tabs from Memcheck --trace-codegen output.
Nicholas Nethercote [Sat, 27 Sep 2003 19:54:04 +0000 (19:54 +0000)] 
Remove extraneous tabs from Memcheck --trace-codegen output.

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

22 years agoRemove two pieces of identical code used by Memcheck and Addrcheck, and put
Nicholas Nethercote [Fri, 26 Sep 2003 14:55:31 +0000 (14:55 +0000)] 
Remove two pieces of identical code used by Memcheck and Addrcheck, and put
them in a shared place.  (They used to be different, when Addrcheck didn't
distinguish between reads and writes, but now they're the same.)

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

22 years agoAdd support for "movl imm32, %esp". Needed for 'grinding vg_startup.S :)
Nicholas Nethercote [Fri, 26 Sep 2003 09:11:51 +0000 (09:11 +0000)] 
Add support for "movl imm32, %esp".  Needed for 'grinding vg_startup.S :)

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

22 years agoFix a couple of bugs in the sigalstack wrapper (Nb: found when I was
Nicholas Nethercote [Fri, 26 Sep 2003 09:06:41 +0000 (09:06 +0000)] 
Fix a couple of bugs in the sigalstack wrapper (Nb: found when I was
(apparently) self-hosting :)

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

22 years agoimplement a couple more instructions. I've mailed this patch to Julian
Dirk Mueller [Fri, 26 Sep 2003 00:32:53 +0000 (00:32 +0000)] 
implement a couple more instructions. I've mailed this patch to Julian
and Nick but got no reply. I guess they're okay with it. I tested them
quite a lot so it should be fine.

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

22 years agobe more specific which allocation failed
Dirk Mueller [Fri, 26 Sep 2003 00:26:07 +0000 (00:26 +0000)] 
be more specific which allocation failed

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

22 years agoimplement all SSE(2) ucodes. now I can run mplayer in valgrind :)
Dirk Mueller [Fri, 26 Sep 2003 00:16:25 +0000 (00:16 +0000)] 
implement all SSE(2) ucodes. now I can run mplayer in valgrind :)

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

22 years agoAt startup, now tests if program is statically linked. Bails with a useful
Nicholas Nethercote [Thu, 25 Sep 2003 18:20:17 +0000 (18:20 +0000)] 
At startup, now tests if program is statically linked.  Bails with a useful
message if so.  If anyone thinks this will break anything, please yell.

Updated FAQ #5 correspondingly, added info on how to combine static and dynamic
libraries.

MERGE TO STABLE(?)

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

22 years agoCleaned up reading of debug info a bit.
Nicholas Nethercote [Thu, 25 Sep 2003 17:54:11 +0000 (17:54 +0000)] 
Cleaned up reading of debug info a bit.

Renamed:
  VG_(read_procselfmaps_contents)() --> VG_(read_procselfmaps)()
  VG_(read_procselfmaps)()          --> VG_(parse_procselfmaps)()
  VG_(read_symbols)()               --> VG_(read_all_symbols)()
  VG_(read_symtab_callback)()       --> VG_(read_seg_symbols)()

Removed the Bool 'read_from_file' arg from (what is now)
VG_(parse_procselfmaps)().  If /proc/self/maps needs to be read beforehand, the
code calls (what is now) VG_(read_procselfmaps)() before.  Still using the
static buffer which is not nice but good enough.

More importantly, I split up VG_(new_exe_segment)() into
VG_(new_exeseg_startup)() and VG_(new_exeseg_mmap)().  This is because at
startup, we were stupidly calling VG_(read_symbols)() for every exe seg, which
parses /proc/self/maps completely in order to load the debug info/symbols for
the exe seg (and any others we haven't already got the symbols for).  Despite
the fact that the startup code reads /proc/self/maps to know which segments are
there at startup.  In other words, we were reading /proc/self/maps several
times more often than necessary, and there were nested reads, which Stephan
Kulow's recent depth patch fixed (but in a pretty hacky way;  this commit fixes
it properly).  So VG_(new_exeseg_startup)() now doesn't cause /proc/self/maps
to be re-read.  Unfortunately we do have to re-read /proc/self/maps for mmap(),
because we don't know the filename from the mmap() call (only the file
descriptor, which isn't enough).

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

22 years agotypo
Dirk Mueller [Tue, 23 Sep 2003 19:07:16 +0000 (19:07 +0000)] 
typo

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

22 years agoAddrcheck was broken, because it wasn't recognising "Overlap" suppressions.
Nicholas Nethercote [Fri, 19 Sep 2003 08:10:07 +0000 (08:10 +0000)] 
Addrcheck was broken, because it wasn't recognising "Overlap" suppressions.
Fixed now.

MERGE TO STABLE (assuming that Addrcheck does overlap checking in STABLE, which
I think it does)

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

22 years agoUsing start_eip instead of eip for disassembly failure messages.
Nicholas Nethercote [Thu, 18 Sep 2003 08:37:20 +0000 (08:37 +0000)] 
Using start_eip instead of eip for disassembly failure messages.

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

22 years agoadd suppression about common X11 protocol and ICE errors. Please
Dirk Mueller [Thu, 18 Sep 2003 01:49:30 +0000 (01:49 +0000)] 
add suppression about common X11 protocol and ICE errors. Please
scream if you don't like this.. Personally I've never seen a valid
warning and all of them were spurious.

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

22 years agoremove default.supp during clean
Dirk Mueller [Thu, 18 Sep 2003 01:42:24 +0000 (01:42 +0000)] 
remove default.supp during clean

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

22 years agocompiler warning fixes
Dirk Mueller [Thu, 18 Sep 2003 01:41:48 +0000 (01:41 +0000)] 
compiler warning fixes

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

22 years agofix compiler warnings
Dirk Mueller [Thu, 18 Sep 2003 01:39:50 +0000 (01:39 +0000)] 
fix compiler warnings

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

22 years agofix compiler warning
Dirk Mueller [Thu, 18 Sep 2003 01:15:32 +0000 (01:15 +0000)] 
fix compiler warning

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

22 years agoSuppress a couple more messages when -q applies.
Julian Seward [Wed, 17 Sep 2003 21:48:26 +0000 (21:48 +0000)] 
Suppress a couple more messages when -q applies.

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

22 years agoAdd patch from Stephan Kulow to solve the following:
Julian Seward [Wed, 17 Sep 2003 07:39:28 +0000 (07:39 +0000)] 
Add patch from Stephan Kulow to solve the following:

   read_procselfmaps calls *record_mapping which
   is startup_segment_callback for init_memory. But this
   again calls through read_symbols read_procselfmaps
   again with read_from_file == True. But this overwrites
   the internal buffer and causes parsing errors.
   (What makes the error a bit funny is that valgrind
    wouldn't have catched that error afaik :)
   Anyway: our solution is to forbid read_from_file from
   with callbacks

MERGE TO STABLE

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

22 years agoAdded some skin-visible functions that give skins a bit more control over
Nicholas Nethercote [Tue, 16 Sep 2003 07:41:43 +0000 (07:41 +0000)] 
Added some skin-visible functions that give skins a bit more control over
how stack snapshots are taken and printed;  they can be used in preference
to VG_(get_ExeContext)() and VG_(pp_ExeContext)().  These are used by
Massif, my heap profiling skin.

Changed --num-callers to allow a backtrace size of 1.

Added code so that when Valgrind fails to disassemble an instruction, the
instructions line/file and address are printed out, which makes it easier to
work out where and what it is.  Required the stack snapshot changes above.

MERGE TO STABLE?

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

22 years agoMade the realpath overlap ones apply for Addrcheck too.
Nicholas Nethercote [Mon, 15 Sep 2003 07:19:19 +0000 (07:19 +0000)] 
Made the realpath overlap ones apply for Addrcheck too.

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

22 years agoFix problem with adjtimex.
Nicholas Nethercote [Tue, 9 Sep 2003 11:27:59 +0000 (11:27 +0000)] 
Fix problem with adjtimex.

MERGE TO STABLE

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

22 years agoWith -v option, client program's argv[] now printed at startup. Should be
Nicholas Nethercote [Tue, 9 Sep 2003 07:26:21 +0000 (07:26 +0000)] 
With -v option, client program's argv[] now printed at startup.  Should be
useful when trying to interpret users' problems.  Each argv is printed on a
separate line, to make it extra clear where each one starts and ends.

MERGE TO STABLE (PLEASE!)

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

22 years agoMade Addrcheck distinguish between invalid reads and invalid writes (previously
Nicholas Nethercote [Fri, 5 Sep 2003 23:29:33 +0000 (23:29 +0000)] 
Made Addrcheck distinguish between invalid reads and invalid writes (previously
was just saying "invalid memory access").

Added a regression test for this, for memcheck and addrcheck.  Also made
Addrcheck use Memcheck's fprw regtest.  Was able to remove the not-very-useful
'true' test for Addrcheck now that it has a couple of real tests.

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

22 years agoForgot to add these files for the writev regression test.
Nicholas Nethercote [Fri, 5 Sep 2003 23:02:38 +0000 (23:02 +0000)] 
Forgot to add these files for the writev regression test.

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

22 years agopatch for adjtimex syscall by Bob Van Manen <BVanManen@Scene7.com>
Dirk Mueller [Fri, 5 Sep 2003 17:46:54 +0000 (17:46 +0000)] 
patch for adjtimex syscall by Bob Van Manen <BVanManen@Scene7.com>
appares to compile for me

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

22 years agoFixed readv() and writev() so they won't fall over if they are given a negative
Nicholas Nethercote [Thu, 4 Sep 2003 21:57:45 +0000 (21:57 +0000)] 
Fixed readv() and writev() so they won't fall over if they are given a negative
count.  Added a regression test for it.

Updated the basic test stderr filter to strip out line numbers from
vg_intercept.c

MERGE TO STABLE

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

22 years agoTrivial assertion fix -- the SSE3 instructions can be of size 8.
Nicholas Nethercote [Thu, 4 Sep 2003 21:12:22 +0000 (21:12 +0000)] 
Trivial assertion fix -- the SSE3 instructions can be of size 8.

MERGE TO STABLE

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

22 years agoFixed brk(); it was almost completely broken.
Nicholas Nethercote [Thu, 4 Sep 2003 20:57:51 +0000 (20:57 +0000)] 
Fixed brk();  it was almost completely broken.

Added a regression test for it.

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

22 years agoFixed overlap errors so the hacky strdup'ing of strings isn't necessary;
Nicholas Nethercote [Thu, 4 Sep 2003 20:50:47 +0000 (20:50 +0000)] 
Fixed overlap errors so the hacky strdup'ing of strings isn't necessary;
now passing in the relevant parameters via an 'extra' struct, as is proper.

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

22 years agodocs typo
Nicholas Nethercote [Fri, 29 Aug 2003 11:42:50 +0000 (11:42 +0000)] 
docs typo

MERGE TO STABLE

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

22 years agoMinor fix: errors on MMX_MemRd instructions were erroneously being called
Nicholas Nethercote [Thu, 28 Aug 2003 17:46:16 +0000 (17:46 +0000)] 
Minor fix: errors on MMX_MemRd instructions were erroneously being called
writes.

MERGE TO STABLE

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

22 years agoimplement waitpid syscall. Patch by Benjamin Lee <benjaminlee@users.sf.net>
Dirk Mueller [Tue, 26 Aug 2003 17:36:26 +0000 (17:36 +0000)] 
implement waitpid syscall. Patch by Benjamin Lee <benjaminlee@users.sf.net>

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

22 years agoTeach Cachegrind about SSE instructions, courtesy of Josef Weidendorfer.
Nicholas Nethercote [Mon, 25 Aug 2003 16:15:40 +0000 (16:15 +0000)] 
Teach Cachegrind about SSE instructions, courtesy of Josef Weidendorfer.

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

22 years agoAdded #17 about how to write suppressions.
Nicholas Nethercote [Wed, 20 Aug 2003 11:19:17 +0000 (11:19 +0000)] 
Added #17 about how to write suppressions.

MERGE TO STABLE (along with several other FAQ changes I've made recently but
forgot to write this note on)

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

22 years agoFix up the way SK_(update_extra)() is called.
Nicholas Nethercote [Tue, 19 Aug 2003 16:14:42 +0000 (16:14 +0000)] 
Fix up the way SK_(update_extra)() is called.

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

22 years agoComment-only change
Nicholas Nethercote [Tue, 19 Aug 2003 12:16:05 +0000 (12:16 +0000)] 
Comment-only change

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

22 years agoFix inaccuracies in #12.
Nicholas Nethercote [Tue, 19 Aug 2003 07:50:24 +0000 (07:50 +0000)] 
Fix inaccuracies in #12.

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

22 years agoAdded FAQ #16, about that assertion failure in 'make' when building.
Nicholas Nethercote [Fri, 15 Aug 2003 07:35:20 +0000 (07:35 +0000)] 
Added FAQ #16, about that assertion failure in 'make' when building.

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

22 years agocomments change only
Nicholas Nethercote [Thu, 14 Aug 2003 15:23:55 +0000 (15:23 +0000)] 
comments change only

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

22 years agoAnother update to #12.
Nicholas Nethercote [Wed, 13 Aug 2003 09:56:30 +0000 (09:56 +0000)] 
Another update to #12.

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

22 years agoClarified FAQ #14.
Nicholas Nethercote [Wed, 13 Aug 2003 08:34:42 +0000 (08:34 +0000)] 
Clarified FAQ #14.

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

22 years agoits linux 2.6.x these days
Dirk Mueller [Sun, 10 Aug 2003 13:37:01 +0000 (13:37 +0000)] 
its linux 2.6.x these days

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

22 years agoAdded FAQ 15, about writing to read-only memory.
Nicholas Nethercote [Thu, 7 Aug 2003 21:24:24 +0000 (21:24 +0000)] 
Added FAQ 15, about writing to read-only memory.

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

22 years agoAdd memcmp() to our collection of functions we do ourselves.
Julian Seward [Wed, 30 Jul 2003 21:24:25 +0000 (21:24 +0000)] 
Add memcmp() to our collection of functions we do ourselves.
I don't trust the glibc not to be optimised-to-hell-and-beyond.

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

22 years agomore wibble
Julian Seward [Sun, 27 Jul 2003 08:04:48 +0000 (08:04 +0000)] 
more wibble

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

22 years agowibble
Julian Seward [Sat, 26 Jul 2003 21:39:05 +0000 (21:39 +0000)] 
wibble

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

22 years ago--> 20030725
Julian Seward [Sat, 26 Jul 2003 17:50:42 +0000 (17:50 +0000)] 
--> 20030725

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

22 years agoIncrease VG_N_FORKHANDLERSTACK from 2 to 4. For reasons known only to
Julian Seward [Sat, 26 Jul 2003 17:49:58 +0000 (17:49 +0000)] 
Increase VG_N_FORKHANDLERSTACK from 2 to 4.  For reasons known only to
itself, pth_atfork1 and 2 fail on R H 7.3 for a size-2 stack, but only
with certain skins.  Don't ask me.

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

22 years agoUpdate for 20030725.
Julian Seward [Fri, 25 Jul 2003 21:11:40 +0000 (21:11 +0000)] 
Update for 20030725.

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

22 years agoVG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH): remove leading spaces and
Julian Seward [Fri, 25 Jul 2003 19:58:11 +0000 (19:58 +0000)] 
VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH): remove leading spaces and
colon created by this mechanism.

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

22 years agoFix the strdup-of-OverlapErr-string problem better. Move the
Julian Seward [Thu, 24 Jul 2003 23:50:17 +0000 (23:50 +0000)] 
Fix the strdup-of-OverlapErr-string problem better.  Move the
strdup to MAC_(record_overlap_error), wherein we know that
s is a string.

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

22 years agoconstruct_error(): strdup the supplied s (string) param which gives
Julian Seward [Thu, 24 Jul 2003 21:29:40 +0000 (21:29 +0000)] 
construct_error(): strdup the supplied s (string) param which gives
extra info about some kinds of errors.  It was being allocated on the
stack by complain2/3 in mac_malloc_wrappers.c.

If the constructed error is found to be a duplicate, free the strdup'd
space.  That limits the worst-case space leak to one strdup'd string
for each different error we keep track of, and the latter by default
is limited to 300.

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

22 years agoMoved vg_kerneliface.h from coregrind/ to include/, where it was needed for
Nicholas Nethercote [Thu, 24 Jul 2003 19:35:00 +0000 (19:35 +0000)] 
Moved vg_kerneliface.h from coregrind/ to include/, where it was needed for
external skin compilation to work.

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

22 years agoChanged the behaviour of realloc() in Memcheck, Addrcheck and Helgrind.
Nicholas Nethercote [Thu, 24 Jul 2003 17:39:59 +0000 (17:39 +0000)] 
Changed the behaviour of realloc() in Memcheck, Addrcheck and Helgrind.

Previously, when realloc() was asked to make a block bigger, the ExeContext
describing where that block was allocated was increased;  however, if the block
became smaller or stayed the same size, the original ExeContext remained.  This
is correct in one way (that's where the memory manager actually parcelled out
the block) but it's not very intuitive.  This commit changes things so the
ExeContext of a block is always changed upon realloc().  I added a regression
test for it too.

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

22 years agoA big commit size-wise, but small concept-wise: removed the ThreadState type
Nicholas Nethercote [Thu, 24 Jul 2003 08:45:32 +0000 (08:45 +0000)] 
A big commit size-wise, but small concept-wise:  removed the ThreadState type
from skin's view, replacing all instances with ThreadId.  Much cleaner.  Had to
change the way VG_(get_ExeContext)() worked a little.  Changed the core/skin
major interface because this breaks the old version.  Also fixed a few minor
related things here and there.

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

22 years agoUse init_ExeContext_storage instead of relying (unintentionally) on
Julian Seward [Wed, 23 Jul 2003 23:01:11 +0000 (23:01 +0000)] 
Use init_ExeContext_storage instead of relying (unintentionally) on
properties of 'static'.  Also, de-globalise this function.  Some days
I really yearn for a proper module system in C.  Come back Haskell,
all is forgiven :-)

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

22 years agoJust clarified VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH)'s workings a bit.
Nicholas Nethercote [Wed, 23 Jul 2003 09:40:50 +0000 (09:40 +0000)] 
Just clarified VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH)'s workings a bit.

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

22 years agoFix a problem in VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH)(): when removing the
Nicholas Nethercote [Wed, 23 Jul 2003 09:22:02 +0000 (09:22 +0000)] 
Fix a problem in VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH)():  when removing the
added paths, it was taking out the colon between the removed entry and the
following, which meant the following was interpreted as having a big chunk of
whitespace at the start, which broke some things.

eg. was:

  "foo:bar"  --> "    bar"

now:

  "foo:bar"  --> "   :bar"

in which case "   " is considered a separate path in it's own right, albeit one
that doesn't mean anything.

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

22 years agoChanged behaviour of VALGRIND_COUNT_LEAKS slightly. Previously, the numbers it
Nicholas Nethercote [Tue, 22 Jul 2003 22:03:58 +0000 (22:03 +0000)] 
Changed behaviour of VALGRIND_COUNT_LEAKS slightly.  Previously, the numbers it
returned (bytes leaked, dubious, etc) were incremented for every leak check
performed.  So if you called VALGRIND_DO_LEAK_CHECK twice in a row, the totals
would be updated twice by the same amount.  This was a bit silly.  So now
COUNT_LEAKS just returns the numbers of bytes leaked found from the previous
leak check.  I even updated the docs, and changed the regression test so old
version fail but the new version passes (by doing two DO_LEAK_CHECKS in a row).

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

22 years agoTruncate the cachegrind.out.<pid> file, if it already exists. It wasn't doing
Nicholas Nethercote [Tue, 22 Jul 2003 20:45:11 +0000 (20:45 +0000)] 
Truncate the cachegrind.out.<pid> file, if it already exists.  It wasn't doing
this, which meant that if a shorter file of the same name was written, the old
contents past the new end would remain, which would be bad.  Had (probably)
never happened because the <pid> suffix makes it very unlikely for filenames to
be reused.

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

22 years agoAdd to the list of new stuff in 20030716, some things I forgot.
Julian Seward [Tue, 22 Jul 2003 17:47:42 +0000 (17:47 +0000)] 
Add to the list of new stuff in 20030716, some things I forgot.

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

22 years agowibble
Nicholas Nethercote [Tue, 22 Jul 2003 10:50:41 +0000 (10:50 +0000)] 
wibble

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

22 years agoAdded overlap checking to Addrcheck, mostly just moving things around. In
Nicholas Nethercote [Tue, 22 Jul 2003 09:12:33 +0000 (09:12 +0000)] 
Added overlap checking to Addrcheck, mostly just moving things around.  In
particular, renamed mc_replace_strmem.c as mac_replace_strmem.c;  the 'mac'
prefix indicates it's shared between Memcheck and Addrcheck.

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

22 years agoInstalling vg_skin.h and dependent .h files, on Josef's request, as it makes
Nicholas Nethercote [Tue, 22 Jul 2003 07:44:21 +0000 (07:44 +0000)] 
Installing vg_skin.h and dependent .h files, on Josef's request, as it makes
separate skins easier to install.

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

22 years agoFix stupid compile error; I iz stupid.
Nicholas Nethercote [Mon, 21 Jul 2003 11:42:27 +0000 (11:42 +0000)] 
Fix stupid compile error;  I iz stupid.

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

22 years agoFix: I thought VG_(malloc)() always zeroed memory. It does at first (because
Nicholas Nethercote [Mon, 21 Jul 2003 10:52:07 +0000 (10:52 +0000)] 
Fix:  I thought VG_(malloc)() always zeroed memory.  It does at first (because
it's mmapped in from /dev/zero), but when recycled may not.

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

22 years agoThis commit fixed some bugs in error and suppression handling. Basically, I
Nicholas Nethercote [Mon, 21 Jul 2003 10:38:23 +0000 (10:38 +0000)] 
This commit fixed some bugs in error and suppression handling.  Basically, I
had forgotten that some errors (PThread errors) are found by the core, rather
than skins and so the skin shouldn't be involved in handling them.  This commit
fixes the problem.

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

22 years agoAdded instructions on checking out from SourceForge CVS to the README file.
Nicholas Nethercote [Mon, 21 Jul 2003 10:17:58 +0000 (10:17 +0000)] 
Added instructions on checking out from SourceForge CVS to the README file.

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

22 years agoClose fds to avoid fd leakage.
Julian Seward [Sun, 20 Jul 2003 22:39:58 +0000 (22:39 +0000)] 
Close fds to avoid fd leakage.

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

22 years agoFix bugs in overlap detection. Tom Hughes <thh@cyberscience.com>
Julian Seward [Sun, 20 Jul 2003 22:28:42 +0000 (22:28 +0000)] 
Fix bugs in overlap detection.  Tom Hughes <thh@cyberscience.com>

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

22 years agofix realpath for Mandrake 9.1
Dirk Mueller [Fri, 18 Jul 2003 08:06:27 +0000 (08:06 +0000)] 
fix realpath for Mandrake 9.1

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

22 years ago--> 20030716
Julian Seward [Wed, 16 Jul 2003 20:10:51 +0000 (20:10 +0000)] 
--> 20030716

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

22 years agoFinal changes for 20030716 snapshot release.
Julian Seward [Wed, 16 Jul 2003 20:10:26 +0000 (20:10 +0000)] 
Final changes for 20030716 snapshot release.

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

22 years agoDo the symbol substitution game for glibc-2.2.93 too (Red Hat 8).
Julian Seward [Wed, 16 Jul 2003 19:59:59 +0000 (19:59 +0000)] 
Do the symbol substitution game for glibc-2.2.93 too (Red Hat 8).

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

22 years agoMake sure all the regression tests get included in the tarball created
Julian Seward [Wed, 16 Jul 2003 19:03:10 +0000 (19:03 +0000)] 
Make sure all the regression tests get included in the tarball created
by 'make dist'.  Being the release dude is so exciting!

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

23 years ago--> 20030715
Julian Seward [Tue, 15 Jul 2003 00:28:35 +0000 (00:28 +0000)] 
--> 20030715

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

23 years agoChanges for snapshot 20030715.
Julian Seward [Mon, 14 Jul 2003 23:38:40 +0000 (23:38 +0000)] 
Changes for snapshot 20030715.

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

23 years agoVG_(setup_code_redirect_table): do errno etc entry-point redirection
Julian Seward [Mon, 14 Jul 2003 20:50:36 +0000 (20:50 +0000)] 
VG_(setup_code_redirect_table): do errno etc entry-point redirection
for glibc-2.3.1 too.

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

23 years agoRun -q
Julian Seward [Sun, 13 Jul 2003 22:35:55 +0000 (22:35 +0000)] 
Run -q

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

23 years agoIntercept waitpid() so as to make it non-blocking. Yet another
Julian Seward [Sun, 13 Jul 2003 19:22:54 +0000 (19:22 +0000)] 
Intercept waitpid() so as to make it non-blocking.  Yet another
ghastly hack.  Roll on proper clonethread-based handling of blocking
syscalls.

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

23 years agoAdd test for correct errno handling in threaded programs.
Julian Seward [Sun, 13 Jul 2003 11:13:37 +0000 (11:13 +0000)] 
Add test for correct errno handling in threaded programs.

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

23 years agoAdd patch from Sami Liedes <sliedes@cc.hut.fi> making GDB use more flexible:
Julian Seward [Sun, 13 Jul 2003 10:54:33 +0000 (10:54 +0000)] 
Add patch from Sami Liedes <sliedes@cc.hut.fi> making GDB use more flexible:
--gdb-path=/path/to/gdb   allows running some alternate GDB
--input-fd=<n>            allows reading input from some fd other than stdin
I even updated the docs :-)

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

23 years agoPush version tag along, to cvs-head-2003-07-13.
Julian Seward [Sun, 13 Jul 2003 01:52:08 +0000 (01:52 +0000)] 
Push version tag along, to cvs-head-2003-07-13.

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

23 years agoRefine the PLT-bypassing-bypassing machinery so it works on Red Hat 9.
Julian Seward [Sun, 13 Jul 2003 00:53:22 +0000 (00:53 +0000)] 
Refine the PLT-bypassing-bypassing machinery so it works on Red Hat 9.
This means we are now are zero regression test failures on RH9 too.  Yay.

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

23 years agoIn vg_memory.c, startup_segment_callback, fix initialisation ordering
Julian Seward [Sat, 12 Jul 2003 12:11:39 +0000 (12:11 +0000)] 
In vg_memory.c, startup_segment_callback, fix initialisation ordering
problem which caused the leak checker to misbehave following recent
PLT-bypass workaround.

In short, it is an error to announce to the skin, segments found which
belong to the low-level memory manager, because the skin may then mark
them as accessible to the client.  This is wrong, and the client
should only acquire accessible memory via malloc etc and stack
movement.  Now we carefully avoid mentioning any segment belonging to
the low level memory manager.

Take the opportunity to improve VG_(within_m_state_static) so that it
also detects pointers within the thread table.  This can reduce the
number of blocks the leak checker spuriously thinks are still
reachable.

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

23 years agoadd_MAC_Chunk: mark shadow block as off-limits to the client so that
Julian Seward [Sat, 12 Jul 2003 01:41:24 +0000 (01:41 +0000)] 
add_MAC_Chunk: mark shadow block as off-limits to the client so that
the leak checker doesn't see the pointer to the real block.  As
detailed in the comment in this function, this must be masking a
deeper memory management bug.

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

23 years agoWhitespace-only change.
Julian Seward [Sat, 12 Jul 2003 01:26:52 +0000 (01:26 +0000)] 
Whitespace-only change.

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

23 years agoRun this test -q
Julian Seward [Fri, 11 Jul 2003 00:17:54 +0000 (00:17 +0000)] 
Run this test -q

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

23 years agoA new implementation of pthread_once() which I believe should comply
Julian Seward [Fri, 11 Jul 2003 00:12:58 +0000 (00:12 +0000)] 
A new implementation of pthread_once() which I believe should comply
properly with POSIX, and not get assertion failures when the same
thread makes nested calls to pthread_once with different once_control
pointers.

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

23 years agoA bit of cleaning up now that symbol table reading is no longer optional.
Julian Seward [Thu, 10 Jul 2003 23:31:27 +0000 (23:31 +0000)] 
A bit of cleaning up now that symbol table reading is no longer optional.

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

23 years agoGive corecheck a SK_(update_extra) so it doesn't panic on
Julian Seward [Thu, 10 Jul 2003 23:29:22 +0000 (23:29 +0000)] 
Give corecheck a SK_(update_extra) so it doesn't panic on
corecheck/tests/res_search.

Nick, I have no idea if this is correct; can you check?

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

23 years agoAdd a new mechanism for intercepting calls, which doesn't depend on
Julian Seward [Thu, 10 Jul 2003 00:17:58 +0000 (00:17 +0000)] 
Add a new mechanism for intercepting calls, which doesn't depend on
the vagaries of the dynamic linker.  In particular this has been
devised so as to work around errno/h_errno/resolver-state misbehaviour
caused by excessive PLT bypassing in glibc-2.3.2: we need to intercept
calls to __errno_location(), __h_errno_location() and __res_state(),
in threaded programs, but we can't always do that because some calls
made internally within glibc-2.3.2 bypass the PLT.

New mechanism is:

- In vg_symtab2.c, VG_(setup_code_redirect_table), search the
  symbol tables to find the entry points of the above functions,
  and find the corresponding entry points replacements in our
  vg_libpthread.c.  Put these pairs into a table,
  VG_(code_redirect_table).

- In vg_translate.c, VG_(translate), consult the table each time
  a translation is made, and if a hit is found, translate from
  the substitute address instead.

This seems to make corecheck/tests/res_search work properly,
although for some as-yet unknown reason breaks the corecheck
skin.  All other skins appear unaffected.

One unfortunate effect is that the lazy debug info scheme is now
nullified, since we always need to read debug info in order to
generate the redirection table.

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

23 years agoAdd iffdeffery to allow testing the call to the DNS resolver in either
Julian Seward [Wed, 9 Jul 2003 21:53:32 +0000 (21:53 +0000)] 
Add iffdeffery to allow testing the call to the DNS resolver in either
the main thread, or in some other thread (the failure case).

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