]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
20 years agoAdd explanatory comment.
Robert Walsh [Mon, 23 Aug 2004 18:15:12 +0000 (18:15 +0000)] 
Add explanatory comment.

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

20 years agoFix to allow 32-bit Valgrind to run on AMD64 boxes. Note: this does
Robert Walsh [Mon, 23 Aug 2004 18:13:16 +0000 (18:13 +0000)] 
Fix to allow 32-bit Valgrind to run on AMD64 boxes.  Note: this does
NOT allow Valgrind to work with 64-bit executables - only with 32-bit
executables on an AMD64 box.

VG_(valgrind_end) now has a slightly different meaning to all the other
VG_(*_end) vars -- ie. it names the last byte, whereas the others go
one byte past the end.

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

20 years agoDon't version the sem_xxx symbols that have more than one version in
Tom Hughes [Mon, 23 Aug 2004 18:05:51 +0000 (18:05 +0000)] 
Don't version the sem_xxx symbols that have more than one version in
glibc - it doesn't matter for valgrind as we only have one version and
by not versioning them we work no matter what version is asked for.

CCMAIL: 86289-done@bugs.kde.org

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

20 years agoHere's a couple more I missed in the last commit.
Nicholas Nethercote [Mon, 23 Aug 2004 16:39:42 +0000 (16:39 +0000)] 
Here's a couple more I missed in the last commit.

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

20 years agoUse SYSNO and res, etc, instead of tst->m_eax in a few places to make things
Nicholas Nethercote [Mon, 23 Aug 2004 16:36:09 +0000 (16:36 +0000)] 
Use SYSNO and res, etc, instead of tst->m_eax in a few places to make things
less x86-specific.

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

20 years agoMakefile.am minor correction
Nicholas Nethercote [Mon, 23 Aug 2004 15:42:21 +0000 (15:42 +0000)] 
Makefile.am minor correction

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

20 years agoSmall step in factoring out arch-specific code: replace
Nicholas Nethercote [Mon, 23 Aug 2004 15:06:23 +0000 (15:06 +0000)] 
Small step in factoring out arch-specific code:  replace
__attribute((regparm(n))) with REGPARM(n) everywhere.  REGPARM() is defined in
vg_skin.h, but will eventually be defined separately for each arch.

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

20 years agoTweak configure.in in preparation for arch and OS ports -- we now have
Nicholas Nethercote [Mon, 23 Aug 2004 14:54:40 +0000 (14:54 +0000)] 
Tweak configure.in in preparation for arch and OS ports -- we now have
variables VG_ARCH, VG_OS and VG_PLATFORM (which equals ${VG_ARCH}-${VG_OS}).
Also added a check for the platform (arch/OS) combination.

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

20 years agoRemoving the example tool 'example' -- it's almost identical to Nulgrind,
Nicholas Nethercote [Mon, 23 Aug 2004 14:15:29 +0000 (14:15 +0000)] 
Removing the example tool 'example' -- it's almost identical to Nulgrind,
except it doesn't actually get built and so ex_main.c and the Makefile.am tend
to get out of date.  Changed the docs to refer to Nulgrind as the example tool
for if you start writing a new one.

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

20 years agoMake some changes to Nulgrind -- it looks like Jeremy made some changes to it
Nicholas Nethercote [Mon, 23 Aug 2004 14:10:36 +0000 (14:10 +0000)] 
Make some changes to Nulgrind -- it looks like Jeremy made some changes to it
as part of FV, but then later these changes become unnecessary.  Anyway, it now
looks more like the other tools again.

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

20 years agoRemove a bunch of unnecessary -DVG_LIBDIR="\"$(libdir)"\" arguments in
Nicholas Nethercote [Mon, 23 Aug 2004 14:02:03 +0000 (14:02 +0000)] 
Remove a bunch of unnecessary -DVG_LIBDIR="\"$(libdir)"\" arguments in
Makefile.am files.

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

20 years agoFix bug, courtesy of Paul Mackerras: when giving find_map_space an address
Nicholas Nethercote [Mon, 23 Aug 2004 09:28:37 +0000 (09:28 +0000)] 
Fix bug, courtesy of Paul Mackerras: when giving find_map_space an address
lower than that of any existing segment, it got it wrong due to the confusing
SkipList API.  I wonder how many more bugs like that there are...?

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

20 years agoMore fixes for the cancellation wrappers in libpthread - if looking
Tom Hughes [Sun, 22 Aug 2004 22:56:25 +0000 (22:56 +0000)] 
More fixes for the cancellation wrappers in libpthread - if looking
for the original function with RTLD_NEXT doesn't work then try looking
for the __libc_ version of the function the RTLD_DEFAULT instead.

The reason for this is that, contrary to the dlsym documentation, it
seems that RTLD_NEXT doesn't always seem to find the definition that
would have been used if it weren't for the override. This is particularly
common wihen libpthread is pulled in implicitly by a dependency from
another library.

This should hopefully fix bug #85658.

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

20 years agoAdd support for a --time-stamp option that causes each message output
Tom Hughes [Sat, 21 Aug 2004 11:10:44 +0000 (11:10 +0000)] 
Add support for a --time-stamp option that causes each message output
by valgrind to include a time stamp. This fixes bug #70587.

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

20 years agoRename VGOFF_(tls) to VGOFF_(tls_ptr) to make it clear it's not the same as
Nicholas Nethercote [Wed, 18 Aug 2004 23:11:45 +0000 (23:11 +0000)] 
Rename VGOFF_(tls) to VGOFF_(tls_ptr) to make it clear it's not the same as
ThreadState.tls.

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

20 years agoRemove 3 identical and self-admittedly spurious assertions.
Nicholas Nethercote [Wed, 18 Aug 2004 22:26:01 +0000 (22:26 +0000)] 
Remove 3 identical and self-admittedly spurious assertions.

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

20 years agoCleaned up the syscall wrappers a bit:
Nicholas Nethercote [Wed, 18 Aug 2004 14:37:17 +0000 (14:37 +0000)] 
Cleaned up the syscall wrappers a bit:
- corrected a few mistakes, eg. when printing them out, in prototypes
- made printing of "%p(%s)" args consistent
- removed 'sizeof_struct_user_fpxregs_struct' from PRE(ptrace)/POST(ptrace)
- allowing for the two different versions of open()

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

20 years agoMinor rejigging of includes to help compilation on Debian systems.
Tom Hughes [Wed, 18 Aug 2004 08:11:34 +0000 (08:11 +0000)] 
Minor rejigging of includes to help compilation on Debian systems.

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

20 years agogetgroups can't block
Nicholas Nethercote [Tue, 17 Aug 2004 13:26:52 +0000 (13:26 +0000)] 
getgroups can't block

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

20 years agoAdd support for the parallel port ioctls.
Tom Hughes [Mon, 16 Aug 2004 19:46:55 +0000 (19:46 +0000)] 
Add support for the parallel port ioctls.

CCMAIL: 86407-done@bugs.kde.org

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

20 years agoTreat a thread which is waiting to be reaped (ie one with a status
Tom Hughes [Sun, 15 Aug 2004 14:34:02 +0000 (14:34 +0000)] 
Treat a thread which is waiting to be reaped (ie one with a status
of VgTs_WaitJoiner) as non-existent for the purposes of cancellation.

This ensures that pthread_cancel returns ESRCH instead of trying to
cancel the thread, which would lead to the thread cleanup code being
run twice.

CCMAIL: 86730-done@bugs.kde.org

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

20 years agoBack out yesterday's change to the symbol versioning in the pthread
Tom Hughes [Sun, 15 Aug 2004 14:11:12 +0000 (14:11 +0000)] 
Back out yesterday's change to the symbol versioning in the pthread
library - it seems that I misunderstood hom the versioning works and
a system looking for a GLIBC_PRIVATE version of the clock routines
would not find the GLIB_2.2.3 one even with the inheritance. It only
seemed to be working on glibc 2.3 systems because of the version
overrides in the source code, but it failed on glibc 2.2.5 systems.

The new approach is to explicity create two versions of the routines
in question, one with a version of GLIBC_2.2.3 and one with a version
of GLIBC_PRIVATE instead. This has been tested on six different systems
and appears to work everywhere.

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

21 years agoAdd support for the POSIX message queue system calls.
Tom Hughes [Sat, 14 Aug 2004 18:52:27 +0000 (18:52 +0000)] 
Add support for the POSIX message queue system calls.

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

21 years agoMaek init_global_thread_specific_state as a constructor to try and ensure
Tom Hughes [Sat, 14 Aug 2004 15:37:59 +0000 (15:37 +0000)] 
Maek init_global_thread_specific_state as a constructor to try and ensure
that it is called as soon as libpthread.so is loaded even if pthread_create
is never called.

This ensures that pthread_exit will work correctly, and I think will also
cure the famous memory leak in the pthread specifics for the main thread.

CCMAIL: 86730-done@bugs.kde.org

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

21 years agoRather surprisingly we weren't actually calling pre_mem_write for the buffer
Tom Hughes [Sat, 14 Aug 2004 12:10:49 +0000 (12:10 +0000)] 
Rather surprisingly we weren't actually calling pre_mem_write for the buffer
argument to the read system call...

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

21 years agoUpdated list of system calls from the list in a 2.6.7 kernel.
Tom Hughes [Sat, 14 Aug 2004 10:49:43 +0000 (10:49 +0000)] 
Updated list of system calls from the list in a 2.6.7 kernel.

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

21 years agoMove __pthread_clock_gettime and __pthread_clock_settime back to
Tom Hughes [Fri, 13 Aug 2004 22:49:11 +0000 (22:49 +0000)] 
Move __pthread_clock_gettime and __pthread_clock_settime back to
the GLIBC_2.2.3 section which is where they were in glibc before
they were moved to GLIBC_PRIVATE around the 2.2.5 time frame.

This makes older systems work correctly as librt will be looking
for the symbols with that version. In order to make newer systems
work we make GLIBC_PRIVATE a child of the most recent version in
the file (currently GLIBC_2.3.3) so that a librt which is looking
for the symbols with a version of GLIBC_PRIVATE will find them.

The real glibc pthread libraries have GLIBC_PRIVATE as a child of
the most recent version anyway, so this shouldn't cause any problems
and with this change librt seems to be OK both on old RedHat 7.1 systems
with glibc 2.2.3 and on Fedora Core 2 systems with glibc 2.3.3.

Hopefully this will fix FAQ 3.4 but I haven't removed that just yet.

CCMAIL: 86696-done@bugs.kde.org

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

21 years agoImprove handling of semctl, msgctl and shmctl so that all relevant
Tom Hughes [Fri, 13 Aug 2004 22:21:51 +0000 (22:21 +0000)] 
Improve handling of semctl, msgctl and shmctl so that all relevant
opcodes are properly validated. Using memcheck on ipcs now produces
no warnings on my machine.

This commit fixes bug #86987.

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

21 years agoBig overhaul of the allocator. Much of the structure is the same, but
Nicholas Nethercote [Wed, 11 Aug 2004 09:40:52 +0000 (09:40 +0000)] 
Big overhaul of the allocator.  Much of the structure is the same, but
lots of the details changed.  Made the following generalisations:

- Recast everything to be entirely terms of bytes, instead of a mixture
  of (32-bit) words and bytes.  This is a bit easier to understand, and
  made the following generalisations possible...

- Almost 64-bit clean;  no longer assuming 32-bit words/pointers.  Only
  (I think) non-64-bit clean part is that VG_(malloc)() et al take an
  Int as the size arg, and size_t is 64-bits on 64-bit machines.

- Made the alignment of blocks returned by malloc() et al completely
  controlled by a single value, VG_MIN_MALLOC_SZB.  (Previously there
  were various magic numbers and assumptions about block alignment
  scattered throughout.) I tested this, all the regression tests pass
  with VG_MIN_MALLOC_SZB of 4, 8, 16, 32, 64.  One thing required for
  this was to make redzones elastic;  the asked-for redzone size is now
  the minimum size;  it will use bigger ones if necessary to get the
  required alignment.

Some other specific changes:

- Made use of types a bit more;  ie. actually using the type 'Block',
  rather than just having everything as arrays of words, so that should
  be a bit safer.

- Removed the a->rz_check field, which was redundant wrt. a->clientmem.

- Fixed up the decision about which list to use so the 4 lists which
  weren't ever being used now are -- the problem was that this hasn't
  been properly updated when alignment changed from 4 to 8 bytes.

- Added a regression test for memalign() and posix_memalign().
  memalign() was aborting if passed a bad alignment argument.

- Added some high-level comments in various places, explaining how the
  damn thing works.

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

21 years agoChange VG_(scheduler)() slightly to remove two more global vars from
Nicholas Nethercote [Mon, 9 Aug 2004 13:13:31 +0000 (13:13 +0000)] 
Change VG_(scheduler)() slightly to remove two more global vars from
vg_include.h.

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

21 years agoRemove some more global variables from vg_include.h, replacing them with
Nicholas Nethercote [Mon, 9 Aug 2004 12:21:57 +0000 (12:21 +0000)] 
Remove some more global variables from vg_include.h, replacing them with
(fewer) functions.

Also fixed execve() so that it works better with .in_place.

Also added a regression test for --trace-children=yes (there were none!)

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

21 years agoPut VALGRIND_INTERNAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE back in
Nicholas Nethercote [Mon, 9 Aug 2004 11:15:10 +0000 (11:15 +0000)] 
Put VALGRIND_INTERNAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE back in
vg_include.h, where they must be otherwise vg_libtpthread.c has problems.
Added a comment explaining why they must be in vg_include.h.

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

21 years agoMake VG_(last_run_tid) and VG_(sigstack) local.
Nicholas Nethercote [Sat, 7 Aug 2004 18:16:56 +0000 (18:16 +0000)] 
Make VG_(last_run_tid) and VG_(sigstack) local.

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

21 years agoDe-globalise a few more counters.
Nicholas Nethercote [Sat, 7 Aug 2004 17:52:25 +0000 (17:52 +0000)] 
De-globalise a few more counters.

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

21 years agoAdd some missing 'static' annotations. Thanks to Josef W for spotting them.
Nicholas Nethercote [Sat, 7 Aug 2004 15:54:53 +0000 (15:54 +0000)] 
Add some missing 'static' annotations.  Thanks to Josef W for spotting them.

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

21 years agoMade cpu-feature detection simpler -- got rid of the confusing global state,
Nicholas Nethercote [Fri, 6 Aug 2004 17:06:14 +0000 (17:06 +0000)] 
Made cpu-feature detection simpler -- got rid of the confusing global state,
put it all into static state within a single function.  Also, now the callers
of get_cpu_features() don't have to worry about whether it's been called
before.

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

21 years agoMake error messages more informative.
Nicholas Nethercote [Thu, 5 Aug 2004 12:16:13 +0000 (12:16 +0000)] 
Make error messages more informative.

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

21 years agohandle_SCSS_change() need not be global.
Nicholas Nethercote [Wed, 4 Aug 2004 15:31:30 +0000 (15:31 +0000)] 
handle_SCSS_change() need not be global.

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

21 years agoRemove sigshutdown_actions(), a hangover from the --stop-after days.
Nicholas Nethercote [Wed, 4 Aug 2004 15:26:38 +0000 (15:26 +0000)] 
Remove sigshutdown_actions(), a hangover from the --stop-after days.

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

21 years agoVG_(get_current_thread_state) doesn't exist, remove declaration.
Nicholas Nethercote [Wed, 4 Aug 2004 14:14:52 +0000 (14:14 +0000)] 
VG_(get_current_thread_state) doesn't exist, remove declaration.

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

21 years agois_valid_or_empty_tid() doesn't need to be global.
Nicholas Nethercote [Wed, 4 Aug 2004 14:03:16 +0000 (14:03 +0000)] 
is_valid_or_empty_tid() doesn't need to be global.

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

21 years agoComment changes only -- compacting
Nicholas Nethercote [Wed, 4 Aug 2004 10:37:49 +0000 (10:37 +0000)] 
Comment changes only -- compacting

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

21 years agoRemove no-longer-used prefixes.
Nicholas Nethercote [Wed, 4 Aug 2004 10:07:47 +0000 (10:07 +0000)] 
Remove no-longer-used prefixes.

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

21 years agocomment wibble
Nicholas Nethercote [Wed, 4 Aug 2004 09:57:31 +0000 (09:57 +0000)] 
comment wibble

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

21 years agoRemove VG_() from name of local function.
Nicholas Nethercote [Tue, 3 Aug 2004 23:44:12 +0000 (23:44 +0000)] 
Remove VG_() from name of local function.

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

21 years agoTweaked sanity-checking: made function naming more consistent, removed
Nicholas Nethercote [Tue, 3 Aug 2004 23:14:00 +0000 (23:14 +0000)] 
Tweaked sanity-checking:  made function naming more consistent, removed
unnecessarily global functions from vg_include.h, etc.

Also tweaked printing of malloc stats.

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

21 years agoTweak stats printing -- use more consistent function names, improve output
Nicholas Nethercote [Tue, 3 Aug 2004 18:08:50 +0000 (18:08 +0000)] 
Tweak stats printing -- use more consistent function names, improve output
formatting slightly, etc.

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

21 years agoalloc_UCodeBlock didn't need to be in vg_include.h. Also tweaked how it works
Nicholas Nethercote [Tue, 3 Aug 2004 17:39:06 +0000 (17:39 +0000)] 
alloc_UCodeBlock didn't need to be in vg_include.h.  Also tweaked how it works
slightly.

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

21 years agoMoved *definitions* of VALGRIND_INTERNAL_PRINTF and
Nicholas Nethercote [Tue, 3 Aug 2004 17:26:39 +0000 (17:26 +0000)] 
Moved *definitions* of VALGRIND_INTERNAL_PRINTF and
VALGRIND_INTERNAL_PRINTF_BACKTRACE from vg_include.h to vg_messages.c.  The
*declarations* stayed.

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

21 years agoSimplified the interface to VG_(translate)(), and merged it with
Nicholas Nethercote [Tue, 3 Aug 2004 17:16:51 +0000 (17:16 +0000)] 
Simplified the interface to VG_(translate)(), and merged it with
create_translation_for().  Cut about 40 lines of code as a side-effect.

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

21 years agoPut UCodeBlock get functions in a more sensible place -- moved from vg_needs.c
Nicholas Nethercote [Tue, 3 Aug 2004 15:49:50 +0000 (15:49 +0000)] 
Put UCodeBlock get functions in a more sensible place -- moved from vg_needs.c
to vg_translate.c, where the other UCodeBlock functions live.

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

21 years agoRemoved 6 global variables from vg_include.h without even having to add
Nicholas Nethercote [Tue, 3 Aug 2004 15:45:46 +0000 (15:45 +0000)] 
Removed 6 global variables from vg_include.h without even having to add
anything, just by moving VG_(helper_offset)() from vg_from_ucode.c to
vg_main.c.

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

21 years agoComment changes only: s/skin/tool/
Nicholas Nethercote [Tue, 3 Aug 2004 13:29:09 +0000 (13:29 +0000)] 
Comment changes only: s/skin/tool/

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

21 years agoFactor out differences between VG_(system) and PRE(execve). Required moving
Nicholas Nethercote [Tue, 3 Aug 2004 13:08:31 +0000 (13:08 +0000)] 
Factor out differences between VG_(system) and PRE(execve).  Required moving
mash_colon_env() from vg_syscalls.c to vg_mylibc.c.  Saved 20 lines of code.

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

21 years agocomment wibble
Nicholas Nethercote [Mon, 2 Aug 2004 16:54:01 +0000 (16:54 +0000)] 
comment wibble

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

21 years agoRemoved cruft from vg_scheduler.c:
Nicholas Nethercote [Mon, 2 Aug 2004 16:27:40 +0000 (16:27 +0000)] 
Removed cruft from vg_scheduler.c:
 ï¿½ things not used any more, eg. global variables
 - removed some things from vg_include.h, making them local -- functions,
   variables and macros
 - other minor clean-ups

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

21 years agoScheduler counts don't need to be in vg_include.h. Replace with a print
Nicholas Nethercote [Mon, 2 Aug 2004 15:27:22 +0000 (15:27 +0000)] 
Scheduler counts don't need to be in vg_include.h.  Replace with a print
function.

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

21 years agowhoops, forgot to remove these in the last commit
Nicholas Nethercote [Mon, 2 Aug 2004 15:19:55 +0000 (15:19 +0000)] 
whoops, forgot to remove these in the last commit

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

21 years agosanity_*_count don't need to be in vg_include.h.
Nicholas Nethercote [Mon, 2 Aug 2004 15:17:43 +0000 (15:17 +0000)] 
sanity_*_count don't need to be in vg_include.h.

Also hide the reg-alloc counters, and replace with a printing function.

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

21 years agoSanity counters don't need to be in vg_include.h.
Nicholas Nethercote [Mon, 2 Aug 2004 15:07:57 +0000 (15:07 +0000)] 
Sanity counters don't need to be in vg_include.h.

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

21 years agoTweak to remove another global variable from vg_include.h
Nicholas Nethercote [Mon, 2 Aug 2004 13:15:26 +0000 (13:15 +0000)] 
Tweak to remove another global variable from vg_include.h

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

21 years agoMake VG_(n_errs_found) local; replace globally with a 'get' function. Renamed
Nicholas Nethercote [Mon, 2 Aug 2004 12:36:01 +0000 (12:36 +0000)] 
Make VG_(n_errs_found) local;  replace globally with a 'get' function.  Renamed
vg_n_errs_suppressed too.

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

21 years agoMake the Supp and Error types local to vg_errcontext.h; they don't need to be
Nicholas Nethercote [Mon, 2 Aug 2004 12:21:09 +0000 (12:21 +0000)] 
Make the Supp and Error types local to vg_errcontext.h;  they don't need to be
global.

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

21 years agoFold VG_(send_signal_to_thread)() into vg_scheduler.c, so it doesn't need to be
Nicholas Nethercote [Mon, 2 Aug 2004 12:10:01 +0000 (12:10 +0000)] 
Fold VG_(send_signal_to_thread)() into vg_scheduler.c, so it doesn't need to be
exported any more.

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

21 years agoFactor out commonality between VG_(synth_fault*)().
Nicholas Nethercote [Sun, 1 Aug 2004 23:06:22 +0000 (23:06 +0000)] 
Factor out commonality between VG_(synth_fault*)().

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

21 years agoReplaced three global variables in vg_include.h with a single global function;
Nicholas Nethercote [Sun, 1 Aug 2004 22:59:18 +0000 (22:59 +0000)] 
Replaced three global variables in vg_include.h with a single global function;
much neater.

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

21 years agoCleaned up vg_include.h:
Nicholas Nethercote [Sun, 1 Aug 2004 22:36:40 +0000 (22:36 +0000)] 
Cleaned up vg_include.h:
- removed various things that are no longer used
- made (module-)local some things that were global
- improved the formatting in places

Removed about 160 lines of code, and non-trivially reduced the number
of global entities.

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

21 years agoFix bug #86254 -- symtab sorting was going array in very obscure circumstances
Nicholas Nethercote [Sun, 1 Aug 2004 20:24:46 +0000 (20:24 +0000)] 
Fix bug #86254 -- symtab sorting was going array in very obscure circumstances
due to a signed/unsigned int problem.

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

21 years agoRemove redundant duplicates of stuff in vg_kerneliface.h.
Nicholas Nethercote [Fri, 30 Jul 2004 23:44:30 +0000 (23:44 +0000)] 
Remove redundant duplicates of stuff in vg_kerneliface.h.

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

21 years agoRemoved unused VG_AR_CLIENT_STACKBASE_REDZONE_SZW.
Nicholas Nethercote [Fri, 30 Jul 2004 23:36:37 +0000 (23:36 +0000)] 
Removed unused VG_AR_CLIENT_STACKBASE_REDZONE_SZW.

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

21 years agoRestructured the as_*() functions so they are simpler and there is no implicit
Nicholas Nethercote [Fri, 30 Jul 2004 21:50:15 +0000 (21:50 +0000)] 
Restructured the as_*() functions so they are simpler and there is no implicit
global state -- the state is threaded explicitly through via function arguments
and return values.  ume.c now has no global variables, which is nice.

Also removed a redundant as_pad() call in stage2's main() which meant
layout_client_space() could be merged with layout_remaining_space().

Also removed a couple of no-longer-used variables and #defines.

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

21 years agoModify the ipc system call so that only those calls which may block
Tom Hughes [Thu, 29 Jul 2004 22:40:07 +0000 (22:40 +0000)] 
Modify the ipc system call so that only those calls which may block
are treated as blocking.

This fixes bug #86000 because shmat is no longer treated as blocking
and it is therefore no longer possible for two threads to try and use
the same address for the shared memory segment.

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

21 years agoModified the fcntl system call so that only those reason codes which
Tom Hughes [Thu, 29 Jul 2004 21:20:11 +0000 (21:20 +0000)] 
Modified the fcntl system call so that only those reason codes which
can block (ie F_SETLKW) are treated as blocking.

This resolves the F_SETOWN problem described in bug #85969.

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

21 years agoAdd support for allowing the POST function for a system call to be called
Tom Hughes [Thu, 29 Jul 2004 17:44:23 +0000 (17:44 +0000)] 
Add support for allowing the POST function for a system call to be called
even when the system call fails, and allow the PRE function to modify the
system call flags.

Also fix nanosleep so that it only marks the returned time as defined
if the system call exited with EINTR due to be interrupted.

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

21 years agoMerge equivalent if statements.
Nicholas Nethercote [Wed, 28 Jul 2004 16:03:29 +0000 (16:03 +0000)] 
Merge equivalent if statements.

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

21 years agoFix the skiplist brokenness Nick found:
Jeremy Fitzhardinge [Tue, 27 Jul 2004 21:49:23 +0000 (21:49 +0000)] 
Fix the skiplist brokenness Nick found:
 - use a simple memset to initialize the next pointer vector
 - fix some previously unexercised code as a result of the above
Still haven't verified we're actually getting skipping, but it doesn't
crash with a make regtest.

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

21 years agoAdded some comments.
Nicholas Nethercote [Mon, 26 Jul 2004 15:43:57 +0000 (15:43 +0000)] 
Added some comments.

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

21 years agoRename 'argv0' and 'argv1' to the more meaningful 'interp_name' and
Nicholas Nethercote [Mon, 26 Jul 2004 15:32:47 +0000 (15:32 +0000)] 
Rename 'argv0' and 'argv1' to the more meaningful 'interp_name' and
'interp_args'.

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

21 years agoNeaten up ume.h: don't export readelf(), mapelf, and struct elfinfo; improve
Nicholas Nethercote [Mon, 26 Jul 2004 15:28:33 +0000 (15:28 +0000)] 
Neaten up ume.h:  don't export readelf(), mapelf, and struct elfinfo;  improve
formatting too.

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

21 years agoRemove accidental double assignment. Also don't assume that VG_(client_base)
Nicholas Nethercote [Mon, 26 Jul 2004 12:44:35 +0000 (12:44 +0000)] 
Remove accidental double assignment.  Also don't assume that VG_(client_base)
is zero.

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

21 years agoEr, actually make this test meaningful. It now aborts correctly if you try to
Nicholas Nethercote [Mon, 26 Jul 2004 11:11:56 +0000 (11:11 +0000)] 
Er, actually make this test meaningful.  It now aborts correctly if you try to
launch stage2 directly, rather than giving an obscure error about the tool
later on.

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

21 years agoRemove unused global variable.
Nicholas Nethercote [Mon, 26 Jul 2004 10:22:33 +0000 (10:22 +0000)] 
Remove unused global variable.

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

21 years agomake non-exported function static
Nicholas Nethercote [Mon, 26 Jul 2004 10:05:55 +0000 (10:05 +0000)] 
make non-exported function static

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

21 years agoMove the decoding of SFENCE out of the SSE only part of disInstr as it
Tom Hughes [Sun, 25 Jul 2004 15:43:00 +0000 (15:43 +0000)] 
Move the decoding of SFENCE out of the SSE only part of disInstr as it
exists on Athlon's that have MMXEXT support and those don't have SSE state
so won't decode it where it was.

CCMAIL: 85947-done@bugs.kde.org

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

21 years agoAdd instruction tests for the LFENCE/MFENCE/SFENCE instructions.
Tom Hughes [Sun, 25 Jul 2004 15:18:21 +0000 (15:18 +0000)] 
Add instruction tests for the LFENCE/MFENCE/SFENCE instructions.

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

21 years agoClarify error msgs
Nicholas Nethercote [Thu, 22 Jul 2004 12:41:12 +0000 (12:41 +0000)] 
Clarify error msgs

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

21 years agoIn response to bug #85665, clarify what --trace-children=yes does.
Nicholas Nethercote [Thu, 22 Jul 2004 08:57:50 +0000 (08:57 +0000)] 
In response to bug #85665, clarify what --trace-children=yes does.

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

21 years agoFix checking of execve() when argv is a null pointer.
Tom Hughes [Wed, 21 Jul 2004 16:23:38 +0000 (16:23 +0000)] 
Fix checking of execve() when argv is a null pointer.

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

21 years agoCorrect Cachegrind changes; better late than never.
Nicholas Nethercote [Wed, 21 Jul 2004 10:37:31 +0000 (10:37 +0000)] 
Correct Cachegrind changes;  better late than never.

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

21 years agoType name wibble
Nicholas Nethercote [Wed, 21 Jul 2004 08:49:02 +0000 (08:49 +0000)] 
Type name wibble

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

21 years agoFix scary bug causing mis-identification of SSE stores vs loads.
Julian Seward [Tue, 20 Jul 2004 23:49:22 +0000 (23:49 +0000)] 
Fix scary bug causing mis-identification of SSE stores vs loads.

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

21 years agoRemove duplicate suppressions for SuSE 9.0 (section appeared twice)
Julian Seward [Tue, 20 Jul 2004 22:42:44 +0000 (22:42 +0000)] 
Remove duplicate suppressions for SuSE 9.0 (section appeared twice)
and add one for SuSE 9.1.

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

21 years agotypo
Nicholas Nethercote [Tue, 20 Jul 2004 14:18:51 +0000 (14:18 +0000)] 
typo

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

21 years agocomment typo
Nicholas Nethercote [Tue, 20 Jul 2004 13:29:02 +0000 (13:29 +0000)] 
comment typo

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

21 years agoFix extremely obscure bug in xadd picked up by QEMU's test suite. The
Julian Seward [Tue, 20 Jul 2004 12:24:53 +0000 (12:24 +0000)] 
Fix extremely obscure bug in xadd picked up by QEMU's test suite.  The
(almost useless) instruction "xadd %reg,%reg" gave the wrong answer
due to a subtlety of the order in which the destination registers are
PUTted to.

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

21 years agogcc sometimes generates "sbbl %reg,%reg" to convert the carry flag
Julian Seward [Tue, 20 Jul 2004 11:42:24 +0000 (11:42 +0000)] 
gcc sometimes generates "sbbl %reg,%reg" to convert the carry flag
into 0 or -1 in reg.  This has no actual dependency on reg, but
memcheck can't see that, and so will yelp if reg contains garbage.  A
simple fix is to put zero into reg before we start, zapping any
undefinedness it might otherwise contain.

Hopefully fixes #84978 (unconfirmed)

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

21 years agoSome systems seem to need linux/netlink.h for linux/fs.h to compile
Tom Hughes [Mon, 19 Jul 2004 23:16:41 +0000 (23:16 +0000)] 
Some systems seem to need linux/netlink.h for linux/fs.h to compile
correctly, so we include it beforehand in case.

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

21 years agoAdd another C call helper.
Nicholas Nethercote [Mon, 19 Jul 2004 08:18:00 +0000 (08:18 +0000)] 
Add another C call helper.

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

21 years agoInclude new_override.stdout.exp in 'make dist'.
Nicholas Nethercote [Sun, 18 Jul 2004 12:05:37 +0000 (12:05 +0000)] 
Include new_override.stdout.exp in 'make dist'.

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

21 years ago--> 2.1.3.CVS
Julian Seward [Sun, 18 Jul 2004 11:47:55 +0000 (11:47 +0000)] 
--> 2.1.3.CVS

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