Florian Krohm [Sun, 9 Oct 2011 19:58:19 +0000 (19:58 +0000)]
This patch by Philippe Waroquiers, philippe.waroquiers@skynet.be
replaces r12124. His analysis of the testcase failure:
I think I understand what is happening: even if the ptrace invoker functionality
is not needed, the timeout to invoke might expire, which then leads
to a message produced by vgdb if ptrace is restricted by the kernel.
I think the best way to fix this is to add the option --max-invoke-ms=0 to vgdb.
Bart Van Assche [Fri, 7 Oct 2011 09:45:14 +0000 (09:45 +0000)]
memcheck/tests/unit_libcbase.c: Convert from old-style gcc designated
initializers to C99-style designated initializers. According to the gcc manual,
the former syntax is obsolete since gcc 2.5
(see also http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Designated-Inits.html).
Bart Van Assche [Fri, 7 Oct 2011 09:39:56 +0000 (09:39 +0000)]
Avoid that using any of the VALGRIND_DISABLE_ERROR_REPORTING,
VALGRIND_ENABLE_ERROR_REPORTING, VALGRIND_DO_ADDED_LEAK_CHECK,
VALGRIND_DO_CHANGED_LEAK_CHECK macros causes gcc 4.6 to print
a warning message about assigning a value to an unused variable.
Florian Krohm [Wed, 5 Oct 2011 03:29:57 +0000 (03:29 +0000)]
Attempt to unbreak this testcase on systems with GCC 4.5.1 and newer.
I suspect the breakage is related to GCC's debug info.
Replace initialization with explicit assignment statement.
Florian Krohm [Wed, 5 Oct 2011 03:09:01 +0000 (03:09 +0000)]
Change the filter order. Filename base backtrace filtering
must come first before the filename gets changed to bogus.S
This should unbreak the failure on x86_64. But I can't test it.
We shall see.
Florian Krohm [Wed, 5 Oct 2011 02:34:33 +0000 (02:34 +0000)]
Update exp files for memcheck's supp_unknown testcase.
Promote the s390x exp file to be the golden one because it has the
correct result. Add an exp-kfail file for those platforms where the testcase
fails (x86).
Florian Krohm [Tue, 4 Oct 2011 20:14:59 +0000 (20:14 +0000)]
Rewrite badjump and badjump2 such that the error occurs now on the
same line for all architectures.
Promote the s390x exp file to be the golden one because it has the
correct result. Add exp-kfail files for those platforms where the testcases
fail (x86).
Florian Krohm [Tue, 4 Oct 2011 03:55:04 +0000 (03:55 +0000)]
Fix execve2 testcase.
First, due to a typo in Makefile.am it was compiled with the wrong flags.
Secondly, the testcase gives an incorrect backtrace on x86 (missing the
line where the error occurs). Updated the generic exp to contain the
correct result and added exp-kfail for platforms where this test fails.
Florian Krohm [Tue, 4 Oct 2011 03:33:59 +0000 (03:33 +0000)]
Turns out there is at least one version of glibc tat contains
a file name writev.c. This screws our filename based backtrace
filtering. Rename writev to writev1 to avoid that problem.
Florian Krohm [Tue, 4 Oct 2011 03:15:38 +0000 (03:15 +0000)]
The testcases execve1 and fwrite actually fail on x86 in the sense that
they produce an incomplete backtrace. Added exp-kfail files to capture the
results with the incomplete backtraces. Updated the generic exp files.
Florian Krohm [Mon, 3 Oct 2011 23:39:54 +0000 (23:39 +0000)]
Improve filtering of backtrace noise in the memcheck bucket
and update exp files accordingly. This works well for x86
and all testcases pass on my machine.
New file filter_memcheck to do the work.
There is a bit of a ripple here as filter_memcheck requires
command line arguments to be passed in. So all users of
filter_memcheck (direct or indirect) were updated as well.
filter_stderr was simplified as was filter_libc.
Florian Krohm [Mon, 3 Oct 2011 23:05:56 +0000 (23:05 +0000)]
Rename testcase from execve to execve1.
The reason is that the point of failure is in glibc
in a file named execve.c The backtrace filtering
(which is filename based) cannot distinguish the
two execve.c file names. Renaming the testcsae does the
trick.
Tom Hughes [Sun, 2 Oct 2011 10:49:35 +0000 (10:49 +0000)]
Avoid using direct access to read multi-byte values from DWARF files
and use read_Type routines instead as they work rather better on strict
aligned (or semi-strict a la ARM) machines. Fixes #282527.
Change the name of the pipes for vgdb by adding username and hostname.
Those are obtained by looking at some commonly defined environment
variables.
That should help with problems where /tmp is shared or process IDs get
recycled. We had some intermittent nightly build issues because of that.
Partial fix for bugzilla #280757.
Be a bit more careful about the return type for VG_MINIMAL_SETJMP,
both the home-grown versions and the versions that feed through to
__builtin_setjmp.
x86-linux, amd64-linux: Implement VG_MINIMAL_SETJMP and
VG_MINIMAL_LONGJMP directly, rather than using __builtin_setjmp
and __builtin_longjmp, since clang-2.9 miscompiles the latter
(by completely ignoring it.)
Also, add comment about the return type for VG_MINIMAL_SETJMP.
Compile everything with -fno-builtin, so as to disable LLVM's
idiom-recognition optimisation. This identifies memset-style
loops and turns them into calls to memset, which in this case
leads to infinite recursion because it does this transformations
in VG_(memset), which is called from memset(), which we also define.
Remove hardwired /tmp directory in vgdb. Honour VG_TMPDIR
and TMPDIR which was introduced when fixing bugzilla #267020.
Factor out VG_(tmpdir). New function VG_(vgdb_path_prefix).
Partially fixes bugzilla #280757.
ML_(read_elf_debug_info): (no functional change, I hope): fix up
confusing control flow, by separating the logic for "is there a
debuginfo file to be found?" from that of "if a debuginfo file was
found, let's record certain facts (section offsets etc) about it."
This makes it possible to add arbitrary other schemes for finding
debuginfo files without further complicating the existing control flow.
Re-enable the use of loctab (line number table) trimming, for a 5% to
10% reduction in debuginfo storage requirements for large applications
on 32 bit platforms. This code had been present since the MacOSX port
was merged but had been disabled. Remove equivalent code for
shrinking the symbol tables since they are much (4 x) smaller than the
line number tables, trimming them is hardly worth the effort.
run_a_thread_NORETURN: add trashed-register annotations for the magic
bits of assembly which finally cause the thread to exit. How this
ever worked before, on any platform, beats me. The lack was causing
some Android builds to segfault at thread exit. Only the s390 version
was correct.