Offsets of groups within event sets are now
stored in a offset table as part of the event set, and
can be accessed directly. Before, offsets were hardcoded
all over the place. This should make addition of further
event groups much simpler.
Julian Seward [Wed, 2 Jun 2010 00:31:34 +0000 (00:31 +0000)]
Add a new program (link_tool_exe.c) and use this to link the tool
executables. Gets rid of the linker script kludgery and uniformly
uses -Ttext=0x38000000 (or whatever) on Linux, so as to accomodate
both traditional ld and gold. Should fix #193413 although I have
been unable to test it. Using a whole new program seems like
overkill, but this is infrastructure to support static linking of
the tool executables on MacOS too.
Bart Van Assche [Thu, 13 May 2010 06:32:36 +0000 (06:32 +0000)]
Added support for glibc 2.12.
Note: many Helgrind and DRD regression tests still fail on Fedora 13 because
of differences in the call stacks of error reports compared to earlier
glibc/gcc combinations.
Julian Seward [Sun, 9 May 2010 22:30:43 +0000 (22:30 +0000)]
New flag --require-text-symbol=:sopatt:fnpatt, to be used to check
that specified shared objects contain specified symbols. Along with a
couple of regtests that unfortunately will fail on MacOSX.
Tom Hughes [Fri, 7 May 2010 15:32:04 +0000 (15:32 +0000)]
Add support for some EVIO ioctls. These are a bit abnormal because
the length part of the ioctl is not fixed so they are essentially
families of ioctls.
Based on patch from Peter Korsgaard. Fixes #235642.
Julian Seward [Wed, 5 May 2010 09:34:42 +0000 (09:34 +0000)]
Rollup changes for Helgrind:
* Add new client request VALGRIND_HG_CLEAN_MEMORY_HEAPBLOCK. This is
like VALGRIND_HG_CLEAN_MEMORY but doesn't take an address range.
Instead it takes a single argument which is supposed to be a pointer
to the start of, or anywhere within, a heap allocated block.
Helgrind then finds the block and paints it as belonging to the
calling thread. This is needed for correctly describing the
behaviour of threadsafe reference counting when applied to classes
involving inheritance of release methods or involving multiple
inheritance.
* Add statistics counters for all basic VTS operations (tick, join,
cmpLEQ, cmp_structural).
Julian Seward [Wed, 5 May 2010 09:23:41 +0000 (09:23 +0000)]
Add a method to get the contents of an XArray so we can index in
it really fast, or iterate over it. This is dangerous and breaks
the nice abstraction (sigh).
Tom Hughes [Thu, 29 Apr 2010 09:22:25 +0000 (09:22 +0000)]
Link the tls test against tls2.so as it references symbols in it
and Fedora 13 no longer allows so's to be required indirectly (via
tls.so in this case).
Tom Hughes [Thu, 29 Apr 2010 09:01:21 +0000 (09:01 +0000)]
Include valgrind headers before system headers to avoid problems
with the system headers #defining things which are used as names
of structure members in vki headers.
This is needed to allow valgrind to build on Fedora 13 and Rawhide.
Tom Hughes [Wed, 28 Apr 2010 08:09:30 +0000 (08:09 +0000)]
Add some basic DWARF4 support. Based on patch from Jakub Jelinek
but with support for VLIW architectures with multiple opcodes per
instruction removed. Fixes #233595.
search_all_symtabs: when mapping addresses to text symbols, consider
any symbol in the r-x mapped segment to be a valid candidate. This
relaxes the filtering criterion slightly, makes it consistent with
other is-it-text? checks. Some addresses which before didn't get
mapped to anything are now correctly mapped to "vtable for Foo"
symbols.
Change the method used in hg_intercepts.c to hide from the user, the
race between mythread_wrapper and the wrapper for pthread_create. The
previous scheme could lead to false race reports in obscure cases.
Julian Seward [Sun, 14 Mar 2010 15:09:27 +0000 (15:09 +0000)]
Improve performance of the fallback path when a translation is not
found in the fast-cache.
* reduce max loading of the per-sector TT hash tables from 80% to 65%.
This reduces the number of required probes by a factor of 3.
* when searching for a translation, don't visit the sectors in a fixed
order. Instead, use an MTF array in which the most popular sectors
(in terms of most likely to hold the translation we're looking for)
are visited first. This reduces the number of required probes by
another factor of 2.
These improvements have no effect on small programs, but improve
scalability on big apps. For an application comprising 300k
translations, runtime on Memcheck is reduced by 3% and on None by
about 20%. The average number of probes per fast-cache miss is
reduced from around 22 to less than 5.
Julian Seward [Thu, 11 Mar 2010 13:43:18 +0000 (13:43 +0000)]
If a race error is detected, check to see whether the raced-on address
is inside a heap block, and if so, print the allocation point of the
heap block. It's stupid not to do this considering that the
implementation already keeps track of all mallocs and frees.
Julian Seward [Mon, 8 Mar 2010 14:45:26 +0000 (14:45 +0000)]
Fix the definedness handling of the last argument of sys_socketpair.
The last argument is really a pointer to an array of two ints and so
we need to say it is an int* and not an int [2]. This just happens to
work on amd64-linux because sizeof(int [2]) == 8 == sizeof(int*). On
arm-linux it duly craps out w/ an assertion because sizeof(int [2]) !=
sizeof(UWord).
Bart Van Assche [Sun, 7 Mar 2010 10:54:21 +0000 (10:54 +0000)]
Changes:
- Generalized the behavior of happens-before / happens-after annotations such
that not only 1:1 but also n:m patterns are supported.
- Dropped support for invoking happens-before / happens-after annotations on
POSIX condition variables (pthread_cond_t).
- Report the details about the offending synchronization object in generic
errors.
- Converted a few tl_assert() statements into error messages.
Bart Van Assche [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.
Bart Van Assche [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.
Tom Hughes [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.
Julian Seward [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.
Tom Hughes [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.
Julian Seward [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.
Tom Hughes [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.