Darwin syscall wrapper cleanups:
- Put Darwin syscall DECL_TEMPLATEs in syscall order.
- Removed the "sys_" prefix from Darwin-specific wrappers, it's not
necessary. Renamed a couple of other wrappers similarly.
- Removed the sys_fcntl64 Darwin wrapper, it was unused.
- Improved some code layout.
Overall this removes 6 "DDD"/"GrP" fixme comments.
Bart Van Assche [Sat, 6 Jun 2009 12:26:05 +0000 (12:26 +0000)]
Consistency improvement: made sure that for all synchronization operations vector clocks are combined after having created a new segment instead of before.
Bart Van Assche [Sat, 6 Jun 2009 10:56:40 +0000 (10:56 +0000)]
- Robustness improvement: do not trigger an assertion failure if one
thread destroys and reinitializes a semaphore another thread is
waiting on but print an error message instead.
- Behavior change: always decrement 'value', even if this makes value
negative.
- Updated expected output files.
Bart Van Assche [Sat, 6 Jun 2009 09:28:28 +0000 (09:28 +0000)]
Disabled libgomp intercepts. Since libgomp support was added to DRD, the
libgomp ABI has changed. Two new functions have been added, namely
gomp_team_barrier_wait() and gomp_team_barrier_wake(). The simplest way
to support all libgomp functions is by disabling the libgomp intercepts.
This fixes bug #195169.
Julian Seward [Fri, 5 Jun 2009 13:17:31 +0000 (13:17 +0000)]
x86-linux: sys_set_thread_area: don't allocate GDT entry number zero,
and reject attempts to use it. This is because the hardware does not
allow entry zero to be used, and apparently doing so confuses some
code (perhaps Windows apps running on Wine). Derived from a patch by
John Reiser.
- Put the old tree in valgrind-old/ and the new one in valgrind-new/,
instead of using valgrind/ for both. That way, the old tree is still
present after running the tests, so it can be inspected for problems.
This required changing how ABT_RUN_REGTEST worked -- it no longer should
change directories itself -- but I think Bart's machine is the only one
using that and I updated the .conf file accordingly.
- Change some variable names -- only use the "ABT_" prefix for variables
defined in the .conf files, and use $DIR and $TAG to match the README.txt.
Fixes for Darwin: it uses a different method for getting the time-and-date
for 24 hours ago. Also, the default 'sh' doesn't support "echo -n" so use
"printf" instead.
Two tweaks:
- Install in $DIR/valgrind/Inst/ rather than $DIR/Inst. Just a bit neater.
- Run "make regtest" instead of "perl tests/vg_regtest --all", because we
might not want to run all tests (eg. we don't on Darwin at the moment).
A number of changes relating to syscall numbering:
- Introduced VG_SYSNUM_STRING and VG_SYSNUM_STRING_EXTRA which factor out
differences in the way syscall numbers are printed on different platforms.
This gets rid of seven "DDD" fixme-style comments.
- This also meant that Darwin syscall numbers are now printed in a
non-ambiguous way -- previously Unix, machine-dependent and diagnostic
syscalls were all printed the same way, even though their numbers overlap.
Now each number is prefixed with "unix", "mdep", etc. And Mach trap
numbers aren't printed as negative numbers now that they have a "mach"
prefix.
- Split each of pub_core_vkiscnums.h and pub_tool_vkiscnums.h into two
parts, one suitable for inclusion in asm files, one suitable for inclusion
in C files; in both cases the latter includes the former. This makes
this module more like other modules that have asm-only components (eg.
m_transtab); it also allows the hacky VG_IN_ASSEMBLY_SOURCE macros and
tests to be removed.
- Removed some of the VG_DARWIN_SYSNO_* macros that were no longer needed,
and renamed some of the existing ones to make their meanings clearer.
- Added comments on the encoding of Darwin syscall numbers so it's
possible for mortals to understand without reading the kernel code..
Add descriptions of DRD and Ptrcheck in the manual intro. Bart, Julian,
please change these if you don't like what I've written, and merge the
changes to the 3.4.X branch.
Bart Van Assche [Tue, 2 Jun 2009 15:03:44 +0000 (15:03 +0000)]
- Portability improvement: switched from __gnu_cxx::hash_map<> (a gcc
extension) to std::map<> (standard C++).
- Replaced tempnam() by mkdtemp() / mkstemp() because gcc emits a warning
about the former.
drd/tests/tsan_unittest is broken on Darwin. For one, OS_MACOSX isn't the
right #define to test for, _APPLE_ is, but defined(VGO_darwin) is better
again. But even if that is fixed, there are still other problems.
So this commit just disables building of that test for Darwin.
Added VGCONF_ARCH_SEC. This fixes problems with building libmpiwrap-*-*.so on
dual-build systems, and will also allow some cut+paste code in Makefile.am
files to be factored out.
Bart Van Assche [Sun, 31 May 2009 18:53:54 +0000 (18:53 +0000)]
- Added support for most of the ANNOTATE_...() macro's supported by
ThreadSanitizer.
- Modified DRD's error reporting code such that it does no longer let
the Valgrind core print the Valgrind thread ID but that it now prints
the DRD thread ID and name. Updated expected output files where
necessary.
- Modified drd/test/Makefile.am such that the tests using gcc's built-in
functions for atomic memory access such that these are only compiled when
the gcc version in use supports these built-in functions.
Bart Van Assche [Sat, 30 May 2009 16:33:10 +0000 (16:33 +0000)]
Added a copy of r1007 of the files racecheck_unittest.cc and thread_wrappers_pthread.h. These files have been obtained from the SVN repository http://data-race-test.googlecode.com/svn/trunk/unittest.
Partly de-hackify auxprogs/Makefile.am. libmpiwrap.*.*.dSYM is now
installed on Darwin. Installation and cleaning are more in line with the
other Makefile.am files.
Julian Seward [Thu, 28 May 2009 17:39:56 +0000 (17:39 +0000)]
Use --gen-suppressions=all rather than =yes, since the latter causes
the entire regtest system to hang if in fact a suppression does need
to be generated (since V stops to ask). Not sure why this flag is
really in here, tho.