ambi/valgrind.git
14 years agoAdded a test program that triggers several happens-before usage errors.
bart [Sun, 7 Mar 2010 10:46:43 +0000 (10:46 +0000)]
Added a test program that triggers several happens-before usage errors.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11069 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdded a definition for a new annotation: ANNOTATE_HAPPENS_DONE().
bart [Sun, 7 Mar 2010 10:44:46 +0000 (10:44 +0000)]
Added a definition for a new annotation: ANNOTATE_HAPPENS_DONE().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11068 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMade the behavior of the annotate_smart_pointer test program configurable
bart [Sun, 7 Mar 2010 10:42:15 +0000 (10:42 +0000)]
Made the behavior of the annotate_smart_pointer test program configurable
through command-line arguments, and made sure that the annotations present
in the source code are recognized by all Valgrind-based data race detection
tools.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11067 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdated Subversion ignore list.
bart [Sat, 6 Mar 2010 19:38:56 +0000 (19:38 +0000)]
Updated Subversion ignore list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11066 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoChanges:
bart [Sat, 6 Mar 2010 10:54:36 +0000 (10:54 +0000)]
Changes:
- Annotated the smart pointer implementation.
- Explained the purpose of the test via source code comments.
- Removed class Semaphore.
- Made it possible to specify the number of threads to be created via the
  command line.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11065 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoOn amd64 all IPC calls behave as if the IPC_64 flag is set in the
tom [Fri, 5 Mar 2010 10:11:41 +0000 (10:11 +0000)]
On amd64 all IPC calls behave as if the IPC_64 flag is set in the
command, so pretend that it is set when calling the generic wrapper
functions in pre and post handlers. Fixes #229509.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11064 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoBuilds now on Win32 too.
bart [Thu, 4 Mar 2010 08:51:30 +0000 (08:51 +0000)]
Builds now on Win32 too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11063 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoRollup fixes for Helgrind:
sewardj [Wed, 3 Mar 2010 23:03:40 +0000 (23:03 +0000)]
Rollup fixes for Helgrind:

* tracking of barriers: add support for resizable barriers

* resync TSan-compatible client requests with latest changes

* add direct access to the client requests used in hg_intercepts.c

* add a client request pair to disable and re-enable tracking
  of arbitrary address ranges

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11062 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake the version number available in the valgrind.h headers, so
sewardj [Wed, 3 Mar 2010 22:57:47 +0000 (22:57 +0000)]
Make the version number available in the valgrind.h headers, so
clients can do version-specific client requests.  This is something we
should have done long ago.  Still needs a way to regtest this, to
check that the embedded version matches what's stated in configure.in.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11061 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoShow the requesting thread (tid) for each translation.
sewardj [Wed, 3 Mar 2010 22:55:42 +0000 (22:55 +0000)]
Show the requesting thread (tid) for each translation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11060 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdded the source code of one more unit test.
bart [Tue, 2 Mar 2010 08:57:50 +0000 (08:57 +0000)]
Added the source code of one more unit test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11059 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix out-of-date comment.
sewardj [Mon, 1 Mar 2010 16:42:56 +0000 (16:42 +0000)]
Fix out-of-date comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11058 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agosome updates for NEWS
njn [Sun, 28 Feb 2010 23:41:07 +0000 (23:41 +0000)]
some updates for NEWS

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11057 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdated the semantics of ANNOTATE_BENIGN_RACE() as discussed on the Valgrind
bart [Sun, 28 Feb 2010 09:51:00 +0000 (09:51 +0000)]
Updated the semantics of ANNOTATE_BENIGN_RACE() as discussed on the Valgrind
developers mailing list (on February 15, 2010).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11056 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd a wrapper for the splice system call and wire it up on
tom [Tue, 23 Feb 2010 10:49:48 +0000 (10:49 +0000)]
Add a wrapper for the splice system call and wire it up on
x86 and amd64 systems. Closes #205788.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11055 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd support for the getcpu system call on x86, ppc32 and ppc64. There
tom [Tue, 23 Feb 2010 10:02:55 +0000 (10:02 +0000)]
Add support for the getcpu system call on x86, ppc32 and ppc64. There
is no support for amd64 because there is no getcpu system call on that
platform - it is always done as a vsyscall in user space.

Based on patch from Aleksander Salwa. Closes #223758.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11054 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoWhen creating a child thread, initially set its os_state.threadgroup
sewardj [Mon, 22 Feb 2010 11:03:10 +0000 (11:03 +0000)]
When creating a child thread, initially set its os_state.threadgroup
to have the same value as the parent.  This avoids exit races leading
to hangs and strange behaviour in heavily multithreaded apps, in the
situation where threads are rapidly being created, and at the same
time an existing thread does sys_exit_group so as to terminate the
entire process.  Thanks to Konstantin S for chasing this down to a
small test case.  Fixes #226116.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11053 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoRemoved trailing whitespace in C source and header files.
bart [Sun, 21 Feb 2010 14:52:59 +0000 (14:52 +0000)]
Removed trailing whitespace in C source and header files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11052 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd parentheses round the "zzarg" macro argument when using it as it
tom [Fri, 19 Feb 2010 16:50:45 +0000 (16:50 +0000)]
Add parentheses round the "zzarg" macro argument when using it as it
may expand to an expression which may mean we wind up doing the cast
before evaluating the expression... Closes #227570.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11051 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix up a few issues with OSS ioctls. Fixes #227325.
tom [Thu, 18 Feb 2010 15:54:45 +0000 (15:54 +0000)]
Fix up a few issues with OSS ioctls. Fixes #227325.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11050 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoIncrease number of supported threads to 500. Fixes #227328.
sewardj [Wed, 17 Feb 2010 16:20:04 +0000 (16:20 +0000)]
Increase number of supported threads to 500.  Fixes #227328.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11049 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoNeither FUTEX_WAKE or FUTEX_WAKE_BITSET actually dereference the
tom [Tue, 16 Feb 2010 15:05:55 +0000 (15:05 +0000)]
Neither FUTEX_WAKE or FUTEX_WAKE_BITSET actually dereference the
futex at all (they just use the address) so we shouldn't insist on
it's contents being define. Fixes #224723.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11048 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoGuard new debug print statement in r11045 correctly (at all!)
sewardj [Mon, 15 Feb 2010 12:00:28 +0000 (12:00 +0000)]
Guard new debug print statement in r11045 correctly (at all!)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11047 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoGet rid of kludgey and non-functional PID caching in the printing
sewardj [Mon, 15 Feb 2010 10:07:05 +0000 (10:07 +0000)]
Get rid of kludgey and non-functional PID caching in the printing
mechanism.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11046 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake -v messages w.r.t. finding of auxiliary debuginfo files less confusing.
sewardj [Mon, 15 Feb 2010 10:05:40 +0000 (10:05 +0000)]
Make -v messages w.r.t. finding of auxiliary debuginfo files less confusing.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11045 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake this usable on Ubuntu by explicitly specifying bash rather than dash.
sewardj [Mon, 15 Feb 2010 10:04:46 +0000 (10:04 +0000)]
Make this usable on Ubuntu by explicitly specifying bash rather than dash.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11044 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoHandle sys_inotify_init1.
sewardj [Mon, 15 Feb 2010 09:58:10 +0000 (09:58 +0000)]
Handle sys_inotify_init1.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11043 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd some intercepts to make Ptrcheck usable-ish on Ubuntu 9.10 (amd64).
sewardj [Mon, 15 Feb 2010 09:57:49 +0000 (09:57 +0000)]
Add some intercepts to make Ptrcheck usable-ish on Ubuntu 9.10 (amd64).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11042 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd debug printing for the env-mashing machinery, to help investigate
sewardj [Mon, 15 Feb 2010 09:54:37 +0000 (09:54 +0000)]
Add debug printing for the env-mashing machinery, to help investigate
#215914 ("Valgrind inserts bogus empty environment variable").

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11041 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoReduce verbosity of the PDB reader a bit. Original verbosity is still
sewardj [Fri, 12 Feb 2010 12:19:36 +0000 (12:19 +0000)]
Reduce verbosity of the PDB reader a bit.  Original verbosity is still
available using "-v".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11040 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoTry to find the PDB file for a given PE file by the totally kludgey
sewardj [Fri, 12 Feb 2010 12:12:39 +0000 (12:12 +0000)]
Try to find the PDB file for a given PE file by the totally kludgey
method of doing "strings file.dll | egrep '\.pdb|\.PDB'".

Distantly derived from a patch by leiz@ucla.edu.  Fixes #222902,
although I still would prefer to do this the proper way, by parsing
the PE file properly.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11039 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix bogus comparisons of PDB vs PE timestamps, so as to avoid
sewardj [Wed, 10 Feb 2010 13:37:37 +0000 (13:37 +0000)]
Fix bogus comparisons of PDB vs PE timestamps, so as to avoid
signed vs unsigned confusion.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11038 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoGeneralise a suppression w.r.t. __setenv on Darwin.
sewardj [Thu, 4 Feb 2010 12:04:14 +0000 (12:04 +0000)]
Generalise a suppression w.r.t. __setenv on Darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11037 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoThe client request VG_USERREQ__LOAD_PDB_DEBUGINFO that we get from
sewardj [Sat, 30 Jan 2010 13:40:27 +0000 (13:40 +0000)]
The client request VG_USERREQ__LOAD_PDB_DEBUGINFO that we get from
Wine as a notification to read PDB/PE debug info, contains a parameter
'reloc' whose purpose is unknown, and which is unused.  Rename it
accordingly, to 'unknown_purpose__reloc'.  (a non-functional change)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11036 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix up obviously-bogus FPO biasing a bit. Not that I have any idea if
sewardj [Sat, 30 Jan 2010 13:36:37 +0000 (13:36 +0000)]
Fix up obviously-bogus FPO biasing a bit.  Not that I have any idea if
this helps at all.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11035 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake the FPO reader much more robust against apparently nonsensical
sewardj [Sat, 30 Jan 2010 13:07:08 +0000 (13:07 +0000)]
Make the FPO reader much more robust against apparently nonsensical
FPO tables.  Also, improve debug printing for FPO reading.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11034 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoPE/PDB handling: allow the PDB (the debuginfo file) to be up to 1
sewardj [Fri, 29 Jan 2010 22:37:02 +0000 (22:37 +0000)]
PE/PDB handling: allow the PDB (the debuginfo file) to be up to 1
minute older than the PE (the .exe/.dll it describes) even though this
doesn't seem particularly safe.  Partially fixes #190675.
(patch from Dan Kegel)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11033 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFollowup fix to r11006. Don't pass va_list by value through client
sewardj [Thu, 28 Jan 2010 15:23:54 +0000 (15:23 +0000)]
Followup fix to r11006.  Don't pass va_list by value through client
requests, since there's no guarantee it is the same size as a machine
word.

This renames the private client request VG_USERREQ__INTERNAL_PRINTF to
VG_USERREQ__INTERNAL_PRINTF_VALIST_BY_REF and changes the
argument-passing accordingly.

The public client requests VG_USERREQ__PRINTF and
VG_USERREQ__PRINTF_BACKTRACE are now deprecated, and handled only in
the case where sizeof(UWord) == sizeof(va_list).  In all other cases V
will now print a detailed error message and abort.  This breaks binary
compatibility of apps compiled using VALGRIND_PRINTF and
VALGRIND_PRINTF_BACKTRACE, but that's not easy to avoid.

VG_USERREQ__PRINTF and VG_USERREQ__PRINTF_BACKTRACE are now replaced
by VG_USERREQ__PRINTF_VALIST_BY_REF and
VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF.  The end-user macros
VALGRIND_PRINTF and VALGRIND_PRINTF_BACKTRACE have been adjusted to
use these new requests instead.

Overall result is that source level compatibility of code using
VALGRIND_PRINTF{,_BACKTRACE} is retained, but binary level
compatibility may be broken, necessitating a rebuild of code using
these macros.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11032 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix handling of mprotect so as to be more consistent with the handling
sewardj [Wed, 27 Jan 2010 10:28:00 +0000 (10:28 +0000)]
Fix handling of mprotect so as to be more consistent with the handling
of mmap.  Fixes #205541 and its dup #210268.  The fix is simple enough
but the analysis is a bit complex, as detailed in comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11031 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix up debug printing for the PDB reader, so it can be properly
sewardj [Tue, 26 Jan 2010 13:26:41 +0000 (13:26 +0000)]
Fix up debug printing for the PDB reader, so it can be properly
controlled from the command line.  Recommended flags are

-v --trace-symtab=yes "--trace-symtab-patt=*nameofinteresting.exe"

Also print entry/exit information for DEBUG_SnarfCodeView and
DEBUG_SnarfLinetab.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11030 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake generated pkgconfig file reflect the new locations of the
tom [Thu, 21 Jan 2010 10:24:37 +0000 (10:24 +0000)]
Make generated pkgconfig file reflect the new locations of the
installed libraries. Patch from Jakub Jelinek. Closes #223657.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11029 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDW_OP_mod should do unsigned arithmetic. Closes #223656.
tom [Thu, 21 Jan 2010 10:19:46 +0000 (10:19 +0000)]
DW_OP_mod should do unsigned arithmetic. Closes #223656.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11028 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdated Subversion ignore list.
bart [Sun, 17 Jan 2010 11:02:23 +0000 (11:02 +0000)]
Updated Subversion ignore list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11027 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd command line flag --vex-guest-chase-cond=no|yes [no] to control
sewardj [Fri, 15 Jan 2010 10:57:57 +0000 (10:57 +0000)]
Add command line flag --vex-guest-chase-cond=no|yes [no] to control
whether front ends should speculatively chase through conditional
branches.  Disabled by default.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11026 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoApparently the dynamic linker on ARM-Linux has soname "ld-linux.so.3"
sewardj [Mon, 11 Jan 2010 13:02:19 +0000 (13:02 +0000)]
Apparently the dynamic linker on ARM-Linux has soname "ld-linux.so.3"
rather than "ld-linux.so.2".  No, don't ask me why.  Anyway, on
Helgrind, don't instrument code in ld-linux.so.3.  This makes Helgrind
pretty much usable on ARM-Linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11025 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd tests for PLD (cache-prefetch-hint) instructions.
sewardj [Sat, 9 Jan 2010 11:44:21 +0000 (11:44 +0000)]
Add tests for PLD (cache-prefetch-hint) instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11024 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoGeneralise X11 suppressions somewhat, and add a suppression needed for
sewardj [Fri, 8 Jan 2010 10:53:04 +0000 (10:53 +0000)]
Generalise X11 suppressions somewhat, and add a suppression needed for
Ubuntu 9.10 on amd64.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11023 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdate expected output.
sewardj [Fri, 8 Jan 2010 10:51:25 +0000 (10:51 +0000)]
Update expected output.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11022 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd the arm exp-bbv tests Makefile to the main configure.in file.
vince [Wed, 6 Jan 2010 15:22:11 +0000 (15:22 +0000)]
Add the arm exp-bbv tests Makefile to the main configure.in file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11021 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd arm regression tests for exp-bbv tool.
vince [Wed, 6 Jan 2010 15:15:28 +0000 (15:15 +0000)]
Add arm regression tests for exp-bbv tool.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11020 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoarm-linux: remove wrappers for __NR_ipc, __NR_mmap, __NR_sigsuspend
sewardj [Wed, 6 Jan 2010 11:08:18 +0000 (11:08 +0000)]
arm-linux: remove wrappers for __NR_ipc, __NR_mmap, __NR_sigsuspend
and __NR_sigaction, which all did I_die_here and therefore can never
have been used.  I think they were here as a result of this file being
derived from the x86-linux version, and that arm-linux uses more
modern equivalents (mmap2, rt_sig*, and the broken-out versions of
ipc).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11019 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoPass sys_cacheflush along to VG_(discard_translations), so we have
sewardj [Wed, 6 Jan 2010 10:22:25 +0000 (10:22 +0000)]
Pass sys_cacheflush along to VG_(discard_translations), so we have
transparent zero-cost self-modifying code support on ARM.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11018 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDisable pid caching for print output: it's wrong in a child after
sewardj [Mon, 4 Jan 2010 21:49:25 +0000 (21:49 +0000)]
Disable pid caching for print output: it's wrong in a child after
a fork() and is very confusing.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11017 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoEnable pread64 on arm-linux.
sewardj [Mon, 4 Jan 2010 21:05:42 +0000 (21:05 +0000)]
Enable pread64 on arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11016 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdated expected output after recent updates in the stack backtrace code.
bart [Mon, 4 Jan 2010 15:01:44 +0000 (15:01 +0000)]
Updated expected output after recent updates in the stack backtrace code.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11015 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAnalysis/make-it-work for arm-linux.
sewardj [Mon, 4 Jan 2010 12:10:24 +0000 (12:10 +0000)]
Analysis/make-it-work for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11014 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoReverted r11010 because it was wrong.
bart [Mon, 4 Jan 2010 12:04:38 +0000 (12:04 +0000)]
Reverted r11010 because it was wrong.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11013 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoEnable origin tracking through arm VFP registers; was apparently
sewardj [Mon, 4 Jan 2010 11:48:19 +0000 (11:48 +0000)]
Enable origin tracking through arm VFP registers; was apparently
previously not enabled only due to brain-deadness on my part.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11012 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdated expected output following bug fixes some time back by Ashley
sewardj [Mon, 4 Jan 2010 11:15:24 +0000 (11:15 +0000)]
Updated expected output following bug fixes some time back by Ashley
Pittman.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11011 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMerged tc23_bogus_condwait.stderr.exp-linux-x86 and -ppc.
bart [Mon, 4 Jan 2010 10:49:48 +0000 (10:49 +0000)]
Merged tc23_bogus_condwait.stderr.exp-linux-x86 and -ppc.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11010 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFix building of these regtests on Darwin. Not sure why they broke
sewardj [Mon, 4 Jan 2010 10:47:25 +0000 (10:47 +0000)]
Fix building of these regtests on Darwin.  Not sure why they broke
in the first place.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11009 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDon't trash %ebx on x86-darwin; gcc doesn't like it and goes off to sulk.
sewardj [Mon, 4 Jan 2010 10:46:44 +0000 (10:46 +0000)]
Don't trash %ebx on x86-darwin; gcc doesn't like it and goes off to sulk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11008 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUpdate arch_test.c properly for arm-linux, and add an entry to
sewardj [Mon, 4 Jan 2010 10:31:41 +0000 (10:31 +0000)]
Update arch_test.c properly for arm-linux, and add an entry to
platform_test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11007 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDon't assume that va_list can be casted to an unsigned word. Fixes
sewardj [Mon, 4 Jan 2010 01:01:02 +0000 (01:01 +0000)]
Don't assume that va_list can be casted to an unsigned word.  Fixes
the build on arm-linux with gcc-4.4 or later.  Patch from Dmitry
Zhurikhin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11006 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoInclude missing files in the tarball.
sewardj [Mon, 4 Jan 2010 00:59:05 +0000 (00:59 +0000)]
Include missing files in the tarball.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11005 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd a test program for ARM v5 integer instructions, and also for some
sewardj [Sun, 3 Jan 2010 23:46:03 +0000 (23:46 +0000)]
Add a test program for ARM v5 integer instructions, and also for some
v6 instructions.  (Johan Björk)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11003 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoAdd the default stderr_filter for this directory; else no tests work.
sewardj [Sun, 3 Jan 2010 23:44:34 +0000 (23:44 +0000)]
Add the default stderr_filter for this directory; else no tests work.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11002 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoHandle Iop_SqrtF32.
sewardj [Sun, 3 Jan 2010 22:29:32 +0000 (22:29 +0000)]
Handle Iop_SqrtF32.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11001 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFurther buildsystem bashing, in order to try and get something
sewardj [Sun, 3 Jan 2010 21:25:08 +0000 (21:25 +0000)]
Further buildsystem bashing, in order to try and get something
make-dist-able.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11000 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake sure the Memcheck tests are built on arm-linux using hardware
sewardj [Sun, 3 Jan 2010 21:24:09 +0000 (21:24 +0000)]
Make sure the Memcheck tests are built on arm-linux using hardware
floating point, since the softfloat results are way different from the
hardware one (not to mention, V reports lots of accesses-below-the-SP
in the softfloat helper functions.)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10999 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoTry to integrate none/tests/arm properly in the build system.
sewardj [Sun, 3 Jan 2010 17:40:07 +0000 (17:40 +0000)]
Try to integrate none/tests/arm properly in the build system.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10998 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDisable this test (effectively) on arm-linux, since that uses
sewardj [Sun, 3 Jan 2010 16:10:14 +0000 (16:10 +0000)]
Disable this test (effectively) on arm-linux, since that uses
sys_rt_sigprocmask and not the Aulde Fashionede sys_sigprocmask.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10997 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoarm-linux: handle sys_signalfd4 and sys_eventfd2. Makes
sewardj [Sun, 3 Jan 2010 11:46:50 +0000 (11:46 +0000)]
arm-linux: handle sys_signalfd4 and sys_eventfd2.  Makes
memcheck/tests/linux-syscalls-2007 succeed on this platform.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10996 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoPortability fix for arm-linux.
sewardj [Sun, 3 Jan 2010 11:39:01 +0000 (11:39 +0000)]
Portability fix for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10995 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoHandle sys_pipe2 on arm-linux; also add some missing numbers to
sewardj [Sun, 3 Jan 2010 11:29:35 +0000 (11:29 +0000)]
Handle sys_pipe2 on arm-linux; also add some missing numbers to
vki-scnums-arm-linux.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10994 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoarm-linux: fake up the commpage entry at a lower level (in
sewardj [Sun, 3 Jan 2010 10:14:03 +0000 (10:14 +0000)]
arm-linux: fake up the commpage entry at a lower level (in
parse_procselfmaps) so that the sync checker still works.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10993 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoVarious minor fixups to make ppc32/64-linux work again following
sewardj [Sat, 2 Jan 2010 13:24:58 +0000 (13:24 +0000)]
Various minor fixups to make ppc32/64-linux work again following
recent ARM-Linux merge.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10992 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake regtests build on arm-linux -- all changes are to do with
sewardj [Sat, 2 Jan 2010 10:43:23 +0000 (10:43 +0000)]
Make regtests build on arm-linux -- all changes are to do with
assembly code for atomic memory modifications.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10991 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoRedo r10971 ("Made sure that C++ compilers do not complain about the
sewardj [Sat, 2 Jan 2010 10:41:46 +0000 (10:41 +0000)]
Redo r10971 ("Made sure that C++ compilers do not complain about the
_VKI_IOC_TYPECHECK() macro") in a way which is easier to understand.
Also, add it for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10990 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoTidy up determination of the PLAT_ macros a bit.
sewardj [Sat, 2 Jan 2010 10:37:58 +0000 (10:37 +0000)]
Tidy up determination of the PLAT_ macros a bit.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10989 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoinitUnwindContext: put back into the loop, some initialisations for
sewardj [Fri, 1 Jan 2010 20:56:13 +0000 (20:56 +0000)]
initUnwindContext: put back into the loop, some initialisations for
ARM which were originally in the loop but inadvertantly got lifted out
during recent merging.  This appears to make stack unwinding work
again on ARM-Linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10988 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoUnbreak stack unwinding on x86-linux and amd64-linux following merge
sewardj [Fri, 1 Jan 2010 19:55:17 +0000 (19:55 +0000)]
Unbreak stack unwinding on x86-linux and amd64-linux following merge
of ARM CFI unwinding in r10986.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10987 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake the Dwarf3 CFI stack unwinding machinery work on arm-linux
sewardj [Fri, 1 Jan 2010 18:46:41 +0000 (18:46 +0000)]
Make the Dwarf3 CFI stack unwinding machinery work on arm-linux
too.  This is a first step towards making not be completely
x86/amd64-linux specific, and so replaces some x86/amd64-specific
stuff with more general constructions:

* structure 'DiCfSI', into which the info is summarised, has been
  made target-specific (ugh), since the sets of registers to be
  unwound differ on different targets.

* enum CfiReg and the CFIC_ constants have been expanded
  accordingly, to handle both arm and x86/amd64 registers.

  The abbreviation "IA" (Intel Architecture) has been used in a
  few places where the x86 and amd64 definitions are shared.

* the CFI reader/summariser in readdwarf.c has been expanded &
  generalised appropriately.

* the DiCfSI evaluator in debuginfo.c, VG_(use_CFI_info), has
  also been generalised appropriately.

  The main change is that instead of passing around triples
  of (IP, SP, BP) values, a new structure 'D3UnwindRegs' is
  passed around instead.  This is defined differently for IA and
  ARM and succeeds in hiding at least some of the differences
  where we don't care about them.

  Note also, D3UnwindRegs duplicates, in purpose and structure,
  structure 'RegSummary' in priv_d3basics.h.  This will be tidied
  up in due course.

This commit almost certainly breaks stack unwinding on amd64-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10986 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMake Callgrind, DRD and Ptrcheck build on arm-linux.
sewardj [Fri, 1 Jan 2010 18:31:41 +0000 (18:31 +0000)]
Make Callgrind, DRD and Ptrcheck build on arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10985 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDon't use -Wdeclaration-after-statement. We long since abandoned any
sewardj [Fri, 1 Jan 2010 18:30:59 +0000 (18:30 +0000)]
Don't use -Wdeclaration-after-statement.  We long since abandoned any
pretense of being buildable with gcc prior to 3.0, hence there's no
point in having this flag.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10984 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agon-break build on x86-darwin following r10982.
sewardj [Fri, 1 Jan 2010 12:44:12 +0000 (12:44 +0000)]
n-break build on x86-darwin following r10982.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10983 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMerge from branches/ARM, all parts of the ARM-Linux port except for
sewardj [Fri, 1 Jan 2010 11:59:33 +0000 (11:59 +0000)]
Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoTrack changes in the names of a few IR primops to do with int<->fp
sewardj [Thu, 31 Dec 2009 19:24:12 +0000 (19:24 +0000)]
Track changes in the names of a few IR primops to do with int<->fp
conversions, as introduced in vex r1949.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10980 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoFollow-up for r10972: added missing #include "config.h".
bart [Thu, 31 Dec 2009 13:31:11 +0000 (13:31 +0000)]
Follow-up for r10972: added missing #include "config.h".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10978 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoBuilds again on Darwin.
bart [Tue, 29 Dec 2009 17:30:16 +0000 (17:30 +0000)]
Builds again on Darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10974 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoRemoved dependency of include/pub_tool_basics.h on config.h.
bart [Tue, 29 Dec 2009 16:56:18 +0000 (16:56 +0000)]
Removed dependency of include/pub_tool_basics.h on config.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10972 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMade sure that C++ compilers do not complain about the _VKI_IOC_TYPECHECK() macro.
bart [Tue, 29 Dec 2009 15:08:14 +0000 (15:08 +0000)]
Made sure that C++ compilers do not complain about the _VKI_IOC_TYPECHECK() macro.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10971 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoChanges:
bart [Tue, 29 Dec 2009 14:11:38 +0000 (14:11 +0000)]
Changes:
- Made sure that C++ compilers do not complain about the header files
  include/pub_tool_libcassert.h and include/pub_tool_basics.h.
- Added the source file none/tests/valgrind_cpp_test.cpp. This source file
  is compiled together with the regression tests in order to verify that
  Valgrind's public header files compile cleanly with a C++ compiler.
These modifications are based on a patch provided by Konstantin Serebryany.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10970 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoHandle adjtimex being called in adjtime mode correctly. Closes #219538.
tom [Mon, 21 Dec 2009 11:29:54 +0000 (11:29 +0000)]
Handle adjtimex being called in adjtime mode correctly. Closes #219538.
Validate the constant field with ADJ_TAI is used in an adjtimex call.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10969 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDocument the 'cc' parameter for OSet creation.
njn [Wed, 16 Dec 2009 02:39:39 +0000 (02:39 +0000)]
Document the 'cc' parameter for OSet creation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10968 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoCallgrind: fix bug 217849: Switch to running thread in CLG_(post_signal)
weidendo [Thu, 10 Dec 2009 19:26:32 +0000 (19:26 +0000)]
Callgrind: fix bug 217849: Switch to running thread in CLG_(post_signal)

If instrumentation is switched off on multithreaded code,
multiple signals in a row handled by different threads could
confuse callgrind.
Callgrind assumed that in post_signal, it has the correct understanding
of the currently running thread. This is not always correct.
Really switch to running thread.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10966 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoMade the description of DRD_TRACE_VAR(), ANNOTATE_TRACE_MEMORY() and
bart [Thu, 10 Dec 2009 17:58:46 +0000 (17:58 +0000)]
Made the description of DRD_TRACE_VAR(), ANNOTATE_TRACE_MEMORY() and
VG_USERREQ__DRD_START_TRACE_ADDR more clear.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10965 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoDouble the size of some table to do with reading CIEs.
sewardj [Thu, 3 Dec 2009 14:35:15 +0000 (14:35 +0000)]
Double the size of some table to do with reading CIEs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10964 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoCope with prelink splitting the bss section of an ELF file into separate
tom [Thu, 3 Dec 2009 09:50:32 +0000 (09:50 +0000)]
Cope with prelink splitting the bss section of an ELF file into separate
dynbss and bss sections by merging them back together again.

This means that (a) we will find variables in the bss and (b) we won't
assert when there is a debuginfo file present where the bss is still
in one piece.

Patch from Jakub Jelinek, closes #217084.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10963 a5019735-40e9-0310-863c-91ae7b9d1cf9

14 years agoIt seems whoever wrote the preadv and pwritev system calls in the
tom [Wed, 2 Dec 2009 16:19:12 +0000 (16:19 +0000)]
It seems whoever wrote the preadv and pwritev system calls in the
kernel decided it would be fun to make them always take the low word
of the offset argument before the high word regardless of the
endianism of the system... Consistency - they've heard of it...

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10962 a5019735-40e9-0310-863c-91ae7b9d1cf9