]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
22 years agoThis commit was manufactured by cvs2svn to create tag svn/VALGRIND_1_9_5
no author [Mon, 7 Apr 2003 22:37:22 +0000 (22:37 +0000)] 
This commit was manufactured by cvs2svn to create tag
'VALGRIND_1_9_5'.

git-svn-id: svn://svn.valgrind.org/valgrind/tags/VALGRIND_1_9_5@1516

22 years agoRequire automake >= 1.5, as suggested by Dirk Mueller.
Julian Seward [Sat, 1 Mar 2003 01:26:55 +0000 (01:26 +0000)] 
Require automake >= 1.5, as suggested by Dirk Mueller.

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

22 years agoChange a bunch of AM_CFLAGS, AM_CXXFLAGS to CFLAGS, CXXFLAGS.
Julian Seward [Fri, 28 Feb 2003 23:22:44 +0000 (23:22 +0000)] 
Change a bunch of AM_CFLAGS, AM_CXXFLAGS to CFLAGS, CXXFLAGS.
The AM_ versions totally break compilation on RH6.2.

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

22 years agoAdded a stderr filter for new_override, that removes the exact numbers for
Nicholas Nethercote [Wed, 26 Feb 2003 10:16:02 +0000 (10:16 +0000)] 
Added a stderr filter for new_override, that removes the exact numbers for
malloc, because different glibc versions seem to allocate different amounts of
memory.

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

22 years agoMake CXXFLAGS be the same as AM_CXXFLAGS, so the correct options are
Julian Seward [Tue, 25 Feb 2003 23:49:46 +0000 (23:49 +0000)] 
Make CXXFLAGS be the same as AM_CXXFLAGS, so the correct options are
used to build the regression tests.  I don't know if this is really
the correct way to fix this problem.  I don't understand why
AM_CXXFLAGS aren't used by default for C++, seeing as how AM_CFLAGS
evidently are used for C sources.

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

22 years agodon't delete it too early
Dirk Mueller [Tue, 25 Feb 2003 11:52:52 +0000 (11:52 +0000)] 
don't delete it too early

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

22 years agofix make distcheck with newer automake
Dirk Mueller [Tue, 25 Feb 2003 01:48:15 +0000 (01:48 +0000)] 
fix make distcheck with newer automake

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

22 years agoAdded a regression test that checks if command line arguments with spaces work.
Nicholas Nethercote [Mon, 24 Feb 2003 22:05:38 +0000 (22:05 +0000)] 
Added a regression test that checks if command line arguments with spaces work.

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

22 years agoUndo rev 1.78, which I committed by accident. Duh.
Julian Seward [Mon, 24 Feb 2003 21:59:31 +0000 (21:59 +0000)] 
Undo rev 1.78, which I committed by accident.  Duh.

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

22 years ago o I fixed a small bug: the code in coregrind/vg_syscalls.c seems
Julian Seward [Mon, 24 Feb 2003 21:55:34 +0000 (21:55 +0000)] 
  o  I fixed a small bug:  the code in coregrind/vg_syscalls.c seems
     to assume that all sockaddrs are non-NULL and non-zero in
     length.  This isn't always true, and when I ran a program that
     used a NULL sockaddr through Valgrind it segfaulted.  I believe
     that the change that I made fixes this bug in general, but I
     might be overlooking something.

From kclark@CetaceanNetworks.com (Kevin D. Clark)

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

22 years agoChange the recently added VG_(memcmp) to use UChars instead of Chars.
Nicholas Nethercote [Mon, 24 Feb 2003 21:43:05 +0000 (21:43 +0000)] 
Change the recently added VG_(memcmp) to use UChars instead of Chars.

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

22 years agoFixes handling of parameters with spaces in, and misc other
Julian Seward [Mon, 24 Feb 2003 21:42:53 +0000 (21:42 +0000)] 
Fixes handling of parameters with spaces in, and misc other
magic hacks from Nick.

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

22 years agoSupport for glibc-2.3.X. (from Stephan Kulow)
Julian Seward [Mon, 24 Feb 2003 21:24:41 +0000 (21:24 +0000)] 
Support for glibc-2.3.X.  (from Stephan Kulow)

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

22 years ago[Julian, you might like to check these changes]
Nicholas Nethercote [Mon, 24 Feb 2003 10:49:08 +0000 (10:49 +0000)] 
[Julian, you might like to check these changes]

Fixed demangler bug -- it was relying on glibc for some functions.  This
triggered an incredibly obscure bug in my experimental skin -- memcpy() was
called within the demangler at (about?) the same time as the dynamic linker was
fiddling with the memcpy() entry, which caused one word of memory (probably
some counter in the dynamic linker) to be incremented, which my skin didn't
like.

So I removed all (AFAICT) of the demangler's dependencies on glibc.  This
required adding macros for memset, memcpy, strlen, strcmp..., to replace them
with their VG_(...) version.  The only #includes now are to .h files that are
part of Valgrind.

Also required #defining "size_t" as "Int".

Also required adding VG_(memcmp)() to vg_mylibc.c.

Also removed the "-1 == EOF" part of the compile-time test in safe-ctype.h
that checks the character set is ASCII.  This was to remove the dependency
on stdio.h.  Slightly dodgy, but should be ok I think/hope.

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

22 years agoAdded two new events: pre_deliver_signal and post_deliver_signal.
Nicholas Nethercote [Mon, 24 Feb 2003 10:42:47 +0000 (10:42 +0000)] 
Added two new events: pre_deliver_signal and post_deliver_signal.

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

22 years agoAdded two new events: pre_deliver_signal and post_deliver_signal.
Nicholas Nethercote [Mon, 24 Feb 2003 10:36:48 +0000 (10:36 +0000)] 
Added two new events: pre_deliver_signal and post_deliver_signal.

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

22 years agoAdded a useful skin instrumentation function.
Nicholas Nethercote [Mon, 24 Feb 2003 10:32:51 +0000 (10:32 +0000)] 
Added a useful skin instrumentation function.

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

22 years agoIncreased maximum number of non-compact helpers.
Nicholas Nethercote [Mon, 24 Feb 2003 10:21:45 +0000 (10:21 +0000)] 
Increased maximum number of non-compact helpers.

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

22 years ago Initial rough hack to spot the stack segment at startup by looking
Julian Seward [Sun, 23 Feb 2003 03:54:59 +0000 (03:54 +0000)] 
   Initial rough hack to spot the stack segment at startup by looking
   for a rwx mapping which contains the startup %esp.

Might be better to look for just rw-.  Stack might not be executable
if there's a noexec patch, and x86-64 actually enforces the x bit
distinctly from r.

--> Look for just rw-.

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

22 years agoFix comment bug.
Julian Seward [Sun, 23 Feb 2003 03:40:03 +0000 (03:40 +0000)] 
Fix comment bug.

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

22 years agoMake poll() return (errno==EINTR) if the poll is interrupted by a signal.
Julian Seward [Sun, 23 Feb 2003 03:37:58 +0000 (03:37 +0000)] 
Make poll() return (errno==EINTR) if the poll is interrupted by a signal.

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

22 years agoHopefully deal with system 252 (__NR_exit_group) correctly.
Julian Seward [Sun, 23 Feb 2003 03:26:08 +0000 (03:26 +0000)] 
Hopefully deal with system 252 (__NR_exit_group) correctly.

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

22 years ago---> 1.9.4
Julian Seward [Sun, 23 Feb 2003 03:25:36 +0000 (03:25 +0000)] 
---> 1.9.4

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

22 years agoSupport kernels > 2.5.43 (David Kimdon <dwhedon@debian.org>)
Julian Seward [Sun, 23 Feb 2003 03:09:33 +0000 (03:09 +0000)] 
Support kernels > 2.5.43 (David Kimdon <dwhedon@debian.org>)

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

22 years agoApply the following:
Julian Seward [Sun, 23 Feb 2003 03:00:29 +0000 (03:00 +0000)] 
Apply the following:

The veneers for msgrcv in vg_intercept.c and vg_libpthread.c are not
returning the number of bytes read correctly - they always return zero
for any non-error case, which causes programs using msgrcv to behave
somewhat non-optimally when running under valgrind ;-)

Attached is a patch against 1.9.3 which fixes this.

Tom

--
Tom Hughes (thh@cyberscience.com)

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

22 years agoFurther cleanups re new method for finding the stack segment at
Julian Seward [Sun, 23 Feb 2003 01:41:17 +0000 (01:41 +0000)] 
Further cleanups re new method for finding the stack segment at
startup.

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

22 years agoInitial rough hack to spot the stack segment at startup by looking
Julian Seward [Sun, 23 Feb 2003 01:25:51 +0000 (01:25 +0000)] 
Initial rough hack to spot the stack segment at startup by looking
for a rwx mapping which contains the startup %esp.  This should be
more robust than the previous mechanism, which checked a small number
of known places and gave up if none matched.  This change is motivated
by Gentoo Linux's high security mode, in which the stack location is
chosen randomly for each new process.

Thanks to Catherine Allen for helping out on this.

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

22 years agoChanged comments only: added a couple of missing syscall numbers.
Nicholas Nethercote [Wed, 19 Feb 2003 11:39:02 +0000 (11:39 +0000)] 
Changed comments only:  added a couple of missing syscall numbers.

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

22 years agoCommitted Jeremy F's patch 86:
Nicholas Nethercote [Mon, 17 Feb 2003 10:09:19 +0000 (10:09 +0000)] 
Committed Jeremy F's patch 86:

  Fix a bug introduced in err_extra changes; not all errors have an 'extra'.

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

22 years agoFixed a minor bug -- the condition for determining whether
Nicholas Nethercote [Mon, 10 Feb 2003 10:17:26 +0000 (10:17 +0000)] 
Fixed a minor bug -- the condition for determining whether
VG_(handle_esp_assignment)() was needed by a skin (and thus whether to register
it in the baseBlock) was different to that used when determining whether to
call it in code generation... so it could be (attempted to be) called having
not been registered.

Fixed this by consistifying the conditions, using a function
VG_(need_to_handle_esp_assignment)() that is used in both places.  The bug
hadn't been found previously because no existing skin exercised the mismatched
conditions in conflicting ways.

Also took VG_(track).post_mem_write out of consideration because it's no longer
important (due to a change in how stack switching is detected).

----
Improved the error message for when a helper can't be found in the baseBlock --
now looks up the debug info to tell you the name of the not-found function.

----
Increased the number of noncompact helpers allowed from 8 to 24

----
Removed a magic number that was hardcoded all over the place, introducing
VG_MAX_REGS_USED for the size of the arrays needed by VG_(get_reg_usage)()

----
Also added these functions

   VG_(get_archreg)()
   VG_(get_thread_archreg)()
   VG_(get_thread_shadow_archreg)()
   VG_(set_thread_shadow_archreg)()

which can be useful for skins.

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

22 years agoFix really stupid cut + paste error.
Nicholas Nethercote [Thu, 6 Feb 2003 08:17:08 +0000 (08:17 +0000)] 
Fix really stupid cut + paste error.

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

22 years agoUgh, fixed it properly this time.
Nicholas Nethercote [Wed, 5 Feb 2003 22:08:58 +0000 (22:08 +0000)] 
Ugh, fixed it properly this time.

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

22 years agoFixed comment typo.
Nicholas Nethercote [Wed, 5 Feb 2003 22:06:48 +0000 (22:06 +0000)] 
Fixed comment typo.

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

22 years agoMade VGOFF_(helper_idiv_64_32) and all the similar helper offsets visible to
Nicholas Nethercote [Mon, 3 Feb 2003 12:33:31 +0000 (12:33 +0000)] 
Made VGOFF_(helper_idiv_64_32) and all the similar helper offsets visible to
skins, so they can determine which helper is being called for CALLM
instructions.

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

22 years agoMinor documentation update about 'details'.
Nicholas Nethercote [Mon, 3 Feb 2003 12:21:53 +0000 (12:21 +0000)] 
Minor documentation update about 'details'.

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

22 years agoMade the setting of VG_(details).avg_translation_sizeB optional, defaulting to
Nicholas Nethercote [Mon, 3 Feb 2003 12:20:07 +0000 (12:20 +0000)] 
Made the setting of VG_(details).avg_translation_sizeB optional, defaulting to
100 bytes (added VG_DEFAULT_TRANS_SIZEB).  Took the now-unnecessary settings
out of Nulgrind and CoreCheck.  Also made .avg_translation_sizeB a UInt (from
an Int), to avoid possibility of negatives.

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

22 years agoAdded some functions for skins to access shadow registers:
Nicholas Nethercote [Mon, 3 Feb 2003 12:03:22 +0000 (12:03 +0000)] 
Added some functions for skins to access shadow registers:
VG_(get_shadow_archreg), VG_(set_shadow_archreg), VG_(shadow_archreg_address).
Curiously, the only way skins could previously access them was with
VG_(shadow_reg_offset), which wasn't very flexible.

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

22 years agoAdded a comment.
Nicholas Nethercote [Mon, 3 Feb 2003 11:25:34 +0000 (11:25 +0000)] 
Added a comment.

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

22 years agoRenamed VG_(nameCondcode)() as VG_(name_UCondcode)() to make it consistent
Nicholas Nethercote [Mon, 3 Feb 2003 11:17:46 +0000 (11:17 +0000)] 
Renamed VG_(nameCondcode)() as VG_(name_UCondcode)() to make it consistent
with similar functions, and made it visible to skins (useful).

Also bumped up the skin interface minor version number due to this change; this
bumping will cover any other binary-compatible changes between now and the next
release (after 1.9.3).

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

22 years agoFixed minor error in --trace-codegen=1xxxx output that meant 'shrdl' was being
Nicholas Nethercote [Mon, 3 Feb 2003 11:08:52 +0000 (11:08 +0000)] 
Fixed minor error in --trace-codegen=1xxxx output that meant 'shrdl' was being
printed as 'shldl'.

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

22 years agoMade more informative the error message that is shown when liveness problems
Nicholas Nethercote [Mon, 3 Feb 2003 11:07:03 +0000 (11:07 +0000)] 
Made more informative the error message that is shown when liveness problems
occur... this is helpful when writing skins, because it's easy for problems
with SK_(instrument)() to screw it up.

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

22 years agoAdded VG_(get_obj)().
Nicholas Nethercote [Tue, 28 Jan 2003 20:40:57 +0000 (20:40 +0000)] 
Added VG_(get_obj)().

Also added declaration for VG_(get_error_where)() to vg_skin.h (which should
have been included with the last commit).

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

22 years agoTwo minor changes:
Nicholas Nethercote [Tue, 28 Jan 2003 19:59:38 +0000 (19:59 +0000)] 
Two minor changes:

  - When recording errors, VG_(dup_extra_and_update)() previously was only
    called if the 'extra' field was non-NULL.  Now it's always called.
    This is for two reasons:

      a. The 'extra' field could be holding a non-pointer value that just
         happens to be 0
      b. The skin might want to update the error, even if it doesn't use
         the 'extra' field.

    A pretty minor change that shouldn't upset anybody.

  - Made the ExeContext 'where' field of an error visible to skins, by
    adding VG_(get_error_where)().  This can be useful, eg. for comparing
    errors for equality.

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

22 years agoSmall changes to expected output, due to recent changes in leak-check
Nicholas Nethercote [Tue, 28 Jan 2003 19:53:09 +0000 (19:53 +0000)] 
Small changes to expected output, due to recent changes in leak-check
reporting.

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

22 years agoI forgot to get rid of these when deleting the client stack perms stuff.
Julian Seward [Sun, 5 Jan 2003 13:11:55 +0000 (13:11 +0000)] 
I forgot to get rid of these when deleting the client stack perms stuff.

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

22 years agoAdd syscall 185 (__NR_capset). From Gerald Carter <jerry@samba.org>.
Julian Seward [Sun, 5 Jan 2003 12:35:19 +0000 (12:35 +0000)] 
Add syscall 185 (__NR_capset).  From Gerald Carter <jerry@samba.org>.

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

22 years agoOnly complain three times about unhandled ioctls, then shut up. Stops
Julian Seward [Sun, 5 Jan 2003 12:19:35 +0000 (12:19 +0000)] 
Only complain three times about unhandled ioctls, then shut up.  Stops
it complaining endlessly when running kscd.

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

22 years agoIncrease default bb limit from 1e+12 to 1e+15. The former limit could
Julian Seward [Sun, 5 Jan 2003 12:16:30 +0000 (12:16 +0000)] 
Increase default bb limit from 1e+12 to 1e+15.  The former limit could
easily be reached in ~12 hours flat out computation on a fast machine
with a simple skin.  It happened to me.

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

22 years agoWhen ignoring memcheck-style client requests for block permissions
Julian Seward [Sat, 28 Dec 2002 13:09:57 +0000 (13:09 +0000)] 
When ignoring memcheck-style client requests for block permissions
changes, print a message the first 3 times so the user at least knows
these requests are getting ignored.  If I was less lazy I would make
these requests -- at least those pertaining to memory addressibility
-- be done properly.  But I'm too lazy.

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

22 years agoRemove the mechanism which allowed clients to set block permissions
Julian Seward [Sat, 28 Dec 2002 12:55:48 +0000 (12:55 +0000)] 
Remove the mechanism which allowed clients to set block permissions
on their stacks and have those blocks automatically cleared when the
stack retreats past them.  This never really worked, certainly didn't
work in a multithreaded setting, and slowed everything down due to
having to do even more stuff at %esp changes.

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

22 years agoRecognise Leak suppressions.
Julian Seward [Sat, 28 Dec 2002 12:36:55 +0000 (12:36 +0000)] 
Recognise Leak suppressions.

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

22 years agosynth_jcond_lit: fix bug in the sequences generated for LE/NLE.
Julian Seward [Sat, 28 Dec 2002 00:19:00 +0000 (00:19 +0000)] 
synth_jcond_lit: fix bug in the sequences generated for LE/NLE.
These assumed that ROR sets the P and Z flags and in fact it
sets neither.  Add an extra OR insn to really set those flags.

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

22 years agoMinor cleanup and verification of the lazy-eflag optimisation stuff.
Julian Seward [Sat, 28 Dec 2002 00:04:08 +0000 (00:04 +0000)] 
Minor cleanup and verification of the lazy-eflag optimisation stuff.
As of now it is correct, following several hours study.

- Rename upd_cc parameters to simd_flags since that's what they
  really mean: does this insn interact at all with %EFLAGS
  (the simulated flags) ?

- Have a convention that calls to new_emit which specify
  FlagsEmpty for both the def and use sets should pass False
  as the simd_flags parameter; this seems more logical than
  saying True.  From partial evaluation of new_emit with
  these args one can see it does nothing under such circumstances,
  as one would hope.

- Add an alternative, unused implementation of new_emit in
  which the state space is explicitly enumerated.  Instructive.

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

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

22 years agoFix type errors in args to VG_(new_emit). No practical effect, since
Julian Seward [Thu, 26 Dec 2002 17:10:12 +0000 (17:10 +0000)] 
Fix type errors in args to VG_(new_emit).  No practical effect, since
(Int)False == (Int)FlagsEmpty, but still.

Whilst hunting (completely unsuccessfully) for some bug causing
MySQL to malfunction with some skins (memcheck), or with most
skins when --single-step=yes.

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

22 years agoImplement pthread_getconcurrency, in the same way as LinuxThreads does it.
Julian Seward [Thu, 26 Dec 2002 12:16:11 +0000 (12:16 +0000)] 
Implement pthread_getconcurrency, in the same way as LinuxThreads does it.

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

22 years agoFix longstanding bug in make_thread_jump_to_cancelhdlr, which caused
Julian Seward [Thu, 26 Dec 2002 11:51:50 +0000 (11:51 +0000)] 
Fix longstanding bug in make_thread_jump_to_cancelhdlr, which caused
pthread_join to a cancelled thread not return PTHREAD_CANCELED as it
should.  This was due to a mix up with stack offsets.

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

22 years agoDon't panic on encountering a LeakSupp.
Julian Seward [Thu, 26 Dec 2002 11:50:21 +0000 (11:50 +0000)] 
Don't panic on encountering a LeakSupp.

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

22 years agoImplement suppressions for leak checks, which is a fairly frequently
Julian Seward [Thu, 26 Dec 2002 01:53:45 +0000 (01:53 +0000)] 
Implement suppressions for leak checks, which is a fairly frequently
asked-for feature.

A leak-check suppression looks like any other, and has the name 'Leak':

{
   example-leak-suppression
   Memcheck,Addrcheck:Leak
   fun:malloc
   fun:foo
   fun:main
}

Fitting this into the core/skin split proved very tricky.  Problem is
we want to scan the suppressions list to find Leak suppressions, but

- The core code can't do it because LeakSupp is a skin-specific
  suppression kind.

- The skin code can't do it because most (all) of the types and
  structures for the suppressions are private to the core.

Eventual "solution" (least-worst thing I could think of) is for the
skins using the leak checker to pass it the value of LeakSupp.
Even that isn't really clean because the skins consider it a value
of type MemCheckSuppKind but the core thinks it must be a
CoreSuppKind, and the two are not to be reconciled.  So I kludged
around this by casting it to a UInt.

Nick, perhaps you know some way to smooth this out?

Apart from that all changes are straightforward.

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

22 years agoDon't assume Perl lives in /usr/bin; do a proper test for it.
Julian Seward [Sun, 22 Dec 2002 19:32:23 +0000 (19:32 +0000)] 
Don't assume Perl lives in /usr/bin; do a proper test for it.

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

22 years ago--> 1.9.3 (not ready yet, but change it anyway)
Julian Seward [Sun, 22 Dec 2002 19:26:30 +0000 (19:26 +0000)] 
--> 1.9.3 (not ready yet, but change it anyway)

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

22 years agoVG_(print_malloc_stats): change a %d to a %u.
Julian Seward [Sun, 22 Dec 2002 19:24:22 +0000 (19:24 +0000)] 
VG_(print_malloc_stats): change a %d to a %u.

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

22 years agovg_scan_all_valid_memory: Don't prod any page unless we're sure we
Julian Seward [Sun, 22 Dec 2002 19:11:14 +0000 (19:11 +0000)] 
vg_scan_all_valid_memory: Don't prod any page unless we're sure we
need to.  Poking pages unnecessarily can cause a page fault which
under some rare circumstances can cause the kernel to extend the stack
segment all the way down to the poked page, which is seriously bad.

Fixes a bug shown by --trace-children=yes --skin=addrcheck
--leak-check=yes when running OpenOffice 1.0.1 on SuSE 8.1. This
distro seems to run with no stack limit, which is one prerequisite of
this bug.

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

22 years agoImplement ADC Ib, AL.
Julian Seward [Mon, 16 Dec 2002 00:14:02 +0000 (00:14 +0000)] 
Implement ADC Ib, AL.

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

22 years agoFix bug in MOV Iv,Ev when Ev is a reg. Noticed by Magnus Christensson
Julian Seward [Mon, 16 Dec 2002 00:10:30 +0000 (00:10 +0000)] 
Fix bug in MOV Iv,Ev when Ev is a reg.  Noticed by Magnus Christensson
<mch@virtutech.se>.  The bug lasted this long because there is an
alternative shorter encoding for the same insn which is usually used
in preference.

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

22 years agoSuppressions for R H 8.
Julian Seward [Sun, 15 Dec 2002 23:09:24 +0000 (23:09 +0000)] 
Suppressions for R H 8.

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

22 years agoRemove spurious \n in message.
Julian Seward [Sun, 15 Dec 2002 13:35:40 +0000 (13:35 +0000)] 
Remove spurious \n in message.

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

22 years agoChange the behaviour of VG_(get_fnname) back to what it was, viz, not
Julian Seward [Sun, 15 Dec 2002 13:11:39 +0000 (13:11 +0000)] 
Change the behaviour of VG_(get_fnname) back to what it was, viz, not
adding offsets ("+N") to the end of function names.  Make a new
function VG_(get_fnname_w_offset) with that behaviour and use it for
%y in VG_(printf) et al.

This is needed so that all addresses within a function generate the
same function name.  The offset'd behaviour was breaking the cache
profiler and dependent program kcachegrind.

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

22 years ago#if 0 out unused functions.
Julian Seward [Sun, 15 Dec 2002 03:10:42 +0000 (03:10 +0000)] 
#if 0 out unused functions.

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

22 years agoThis test should actually elicit a (false) warning from memcheck,
Julian Seward [Sun, 15 Dec 2002 02:59:03 +0000 (02:59 +0000)] 
This test should actually elicit a (false) warning from memcheck,
so the .stderr.exp should reflect that.

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

22 years agoAlso update this for new code manager.
Julian Seward [Sun, 15 Dec 2002 02:51:21 +0000 (02:51 +0000)] 
Also update this for new code manager.

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

22 years agoFix regression failure caused by different messages from new code
Julian Seward [Sun, 15 Dec 2002 02:36:48 +0000 (02:36 +0000)] 
Fix regression failure caused by different messages from new code
management stuff.

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

22 years agoAlso diff the U (undefined) symbols.
Julian Seward [Sun, 15 Dec 2002 02:05:02 +0000 (02:05 +0000)] 
Also diff the U (undefined) symbols.

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

22 years agoMessage cosmetics.
Julian Seward [Sun, 15 Dec 2002 02:00:41 +0000 (02:00 +0000)] 
Message cosmetics.

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

22 years agoChange default state of the private-stacks optimisation to off, to be
Julian Seward [Sun, 15 Dec 2002 01:56:17 +0000 (01:56 +0000)] 
Change default state of the private-stacks optimisation to off, to be
on the conservative side.

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

22 years agoRemove comment line referring to old LRU stuff.
Julian Seward [Sun, 15 Dec 2002 01:47:05 +0000 (01:47 +0000)] 
Remove comment line referring to old LRU stuff.

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

22 years agowhitespace change
Julian Seward [Sun, 15 Dec 2002 01:44:47 +0000 (01:44 +0000)] 
whitespace change

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

22 years agoGet rid of the --check-addrVs flag and everything to do with it.
Julian Seward [Sun, 15 Dec 2002 01:42:22 +0000 (01:42 +0000)] 
Get rid of the --check-addrVs flag and everything to do with it.
It no longer makes much sense now we have a seperate addrcheck skin.

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

22 years agoMerge patch from JeremyF:
Julian Seward [Sat, 14 Dec 2002 23:59:09 +0000 (23:59 +0000)] 
Merge patch from JeremyF:

66-illegal-instr

When translation encounters an illegal instruction, emit a call to an
illegal instruction rather than giving up altogether. Some programs
check for CPU capabilities by actually trying them out, so we want to
match a dumb Pentium's behaviour a little better.

It still prints the message, so it won't hide actual illegal or
mis-parsed instructions.  I was hoping this might make the Nvidia
drivers realize they're running on a pre-MMX P5, but apparently they
just won't take that as an answer.  It does make the virtual CPU
behave a little more like a real CPU though.

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

22 years agoMerge patch from JeremyF:
Julian Seward [Sat, 14 Dec 2002 23:49:42 +0000 (23:49 +0000)] 
Merge patch from JeremyF:

71-linux-2.5

There doesn't seem to be any problem supporting Linux 2.5 (and one
presumes 2.6 when it appears).

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

22 years agoVG_(handle_esp_assignment): merge two conditional jumps into one on
Julian Seward [Sat, 14 Dec 2002 23:18:06 +0000 (23:18 +0000)] 
VG_(handle_esp_assignment): merge two conditional jumps into one on
common path.

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

22 years agowhitespace and __inline__ trivial changes
Julian Seward [Sat, 14 Dec 2002 23:11:35 +0000 (23:11 +0000)] 
whitespace and __inline__ trivial changes

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

22 years agoMerge patch from JeremyF:
Julian Seward [Thu, 12 Dec 2002 23:54:47 +0000 (23:54 +0000)] 
Merge patch from JeremyF:

75-simple-jle

Another pattern to test for Jle/Jnle. The observation is that EFLAGS
looks like this:

----O--+SZ------

with Z in bit 6, S in 7 and O in 11. Therefore RORL $7, %eflags will
result in:

Z------+-------+-------+---O---S

Since parity is only computed on the lower 8 bits, testing on P will
determine whether O==S, and since Z is in the MSB, it can be tested
with S.

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

22 years agoTighten up assertion in VG_(target_forward).
Julian Seward [Thu, 12 Dec 2002 23:50:22 +0000 (23:50 +0000)] 
Tighten up assertion in VG_(target_forward).

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

22 years agoMerge patch from JeremyF:
Julian Seward [Thu, 12 Dec 2002 23:42:48 +0000 (23:42 +0000)] 
Merge patch from JeremyF:

72-jump

Add some codegen infrastructure to make it easier to generate local
jumps. If you want to generate a local backwards jump, use
VG_(init_target)(&tgt) to initialize the target descriptor, then
VG_(emit_target_back)(&tgt) just before emitting the target
instruction. Then, when emitting the delta for the jump, call
VG_(emit_delta)(&tgt).

Forward jumps are analogous, except that you call VG_(emit_delta)()
then VG_(emit_target_forward)().

The new emit function, VG_(emit_jcondshort_target)() takes a target
pointer rather than a delta.

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

22 years agoMerge patch from JeremyF. This is a fixed version of the original
Julian Seward [Thu, 12 Dec 2002 23:13:21 +0000 (23:13 +0000)] 
Merge patch from JeremyF.  This is a fixed version of the original
69-simple-jlo, which takes account of the fact that the P flag is set
only from the lowest 8 bits of the result, a problem causing the
original version of this patch not to work right.

Also fixes a call to new_emit.

69-simple-jlo

For Jlo and Jnlo, which test S == O or S != O, when generating special
test sequences which don't require the simulated flags in the real
flags, generate a test and parity test to see if both bits are equal
(even parity) or not equal (odd parity).

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

22 years agoMerge (from 1_0_BRANCH) rev 1.16.2.4 of the old vg_cachesim.c:
Julian Seward [Wed, 11 Dec 2002 00:45:42 +0000 (00:45 +0000)] 
Merge (from 1_0_BRANCH) rev 1.16.2.4 of the old vg_cachesim.c:

Make file_err() not abort the current process; recover and keep
going instead.  This fixes a problem running OpenOffice on cachegrind.

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

22 years agoBack out rev 1.27 since this seems to be causing mozilla-1.2.1 to loop
Julian Seward [Tue, 10 Dec 2002 23:44:17 +0000 (23:44 +0000)] 
Back out rev 1.27 since this seems to be causing mozilla-1.2.1 to loop
on memcheck on R H 6.2.  Don't know why.

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

22 years agoVG_(saneUInstr): relax CCf so as to allow insns which read ZCP -- the
Julian Seward [Tue, 10 Dec 2002 22:24:03 +0000 (22:24 +0000)] 
VG_(saneUInstr): relax CCf so as to allow insns which read ZCP -- the
floating point conditional moves.

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

22 years agoMake it build on R H 6.2 (with egcs-2.91.66).
Julian Seward [Mon, 9 Dec 2002 23:32:58 +0000 (23:32 +0000)] 
Make it build on R H 6.2 (with egcs-2.91.66).

Jeremy, can you just cast your eye over this (sanity check) ?  Thx -- J

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

22 years agosynth_jcond_lit: Handle simd cases for CondO / CondNO.
Julian Seward [Mon, 9 Dec 2002 22:44:00 +0000 (22:44 +0000)] 
synth_jcond_lit: Handle simd cases for CondO / CondNO.

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

22 years agoMerge patch from JeremyF:
Julian Seward [Mon, 9 Dec 2002 19:20:00 +0000 (19:20 +0000)] 
Merge patch from JeremyF:

69-simple-jlo

For Jlo and Jnlo, which test S == O or S != O, when generating special
test sequences which don't require the simulated flags in the real
flags, generate a test and parity test to see if both bits are equal
(even parity) or not equal (odd parity).

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

22 years agoNULLify the destructor field when a thread key is deleted. This
Julian Seward [Mon, 9 Dec 2002 19:07:59 +0000 (19:07 +0000)] 
NULLify the destructor field when a thread key is deleted.  This
allegedly fixes the following (haven't tested it myself):

valgrind: vg_scheduler.c:3454 (scheduler_sanity): Assertion
`vg_thread_keys[i].destructor == ((void *)0)' failed.

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

22 years agoImplement (nop, but that's OK according to POSIX) pthread_set_concurrency.
Julian Seward [Sun, 8 Dec 2002 23:51:32 +0000 (23:51 +0000)] 
Implement (nop, but that's OK according to POSIX) pthread_set_concurrency.

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

22 years agoImplement (as a nop) pthread_rwlockattr_destroy.
Julian Seward [Sun, 8 Dec 2002 23:42:17 +0000 (23:42 +0000)] 
Implement (as a nop) pthread_rwlockattr_destroy.

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

22 years agoClarify 65-fix-ldt (comment-only change).
Julian Seward [Sun, 8 Dec 2002 23:27:21 +0000 (23:27 +0000)] 
Clarify 65-fix-ldt (comment-only change).

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

22 years agoFix for the following (line number for 1.0.X series):
Julian Seward [Sun, 8 Dec 2002 23:24:18 +0000 (23:24 +0000)] 
Fix for the following (line number for 1.0.X series):

valgrind: vg_scheduler.c:3446 (scheduler_sanity): Assertion
`vgPlain_kisemptysigset( & vgPlain_threads[i].sigs_waited_for)' failed.

Test case is:

#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>

sigset_t intr;

void *
waiter (void *arg)
{
  int signum;
  printf ("Waiter started\n");

  sigwait (&intr, &signum);

  printf ("Waiter got signal %d (nothing will happen though)\n", signum);
  return 0;
}

int main ()
{
  pthread_t waiter_id;
  void *status;

  sigemptyset (&intr);
  sigaddset (&intr, SIGINT);
  pthread_sigmask (SIG_BLOCK, &intr, 0);

  printf ("Starting the sigwait thread\n");

  pthread_create (&waiter_id, 0, waiter, 0);

  sleep (2);
  printf ("Canceling the sigwait thread\n");

  pthread_cancel (waiter_id);
  pthread_join (waiter_id, &status);

  printf ("All done\n");
  return 0;
}

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

22 years agoGet rid of the flag --fast-jcc; it's wired-on by default. Assumes that
Julian Seward [Sun, 8 Dec 2002 22:24:59 +0000 (22:24 +0000)] 
Get rid of the flag --fast-jcc; it's wired-on by default.  Assumes that
pushf/popf is catastrophically expensive on most target CPUs, which is
certainly true for P3 and Athlon and I assume (but not checked) P4.

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

22 years agoMerge patch from JeremyF:
Julian Seward [Sun, 8 Dec 2002 22:19:04 +0000 (22:19 +0000)] 
Merge patch from JeremyF:

67-dist

Fixes to various places Makefile.am to generate proper distributions.

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

22 years agoMerge patch from JeremyF:
Julian Seward [Sun, 8 Dec 2002 22:16:58 +0000 (22:16 +0000)] 
Merge patch from JeremyF:

55-ac-clientreq

ADDRCHECK: implement some client requests

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

22 years agoMerge patch from JeremyF:
Julian Seward [Sun, 8 Dec 2002 22:14:11 +0000 (22:14 +0000)] 
Merge patch from JeremyF:

65-fix-ldt

Fix LDT handling in threaded programs. do__apply_in_new_thread() was
failing to set up the child thread's LDT inherited from the parent,
and was triggering an assert in VG_(save_thread_state)() when trying
to copy the parent's thread state to the child.

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