Tom Hughes [Mon, 7 Sep 2009 08:58:29 +0000 (08:58 +0000)]
Unmap the vdso as well as suppressing it by dropping the auxv
entry as on some systems the vdso will be at a random address
and can conflict with things like wine that need to tightly
control where things are mapped.
Bart Van Assche [Wed, 26 Aug 2009 18:11:18 +0000 (18:11 +0000)]
Added regression tests that verify the following behavior:
- On Linux, whether Valgrind properly intercepts the system calls that access
/proc/self/cmdline, /proc/<pid>/cmdline, /proc/self/exe and /proc/<pid>/exe.
- On Darwin, whether Valgrind does not modify the behavior of the system calls
that access the aforementioned files.
Bart Van Assche [Tue, 25 Aug 2009 20:15:41 +0000 (20:15 +0000)]
Switched back from dynamic detection of whether the proc filesystem
is mounted to compile-time logic in order to minimize the differences
in behavior with Valgrind version 3.5.0.
Bart Van Assche [Tue, 25 Aug 2009 17:34:58 +0000 (17:34 +0000)]
Renamed the function VG_(have_proc_filesystem)() into
VG_(is_procfs_mounted)(). The old name was derived from the name
of the preprocessor macro HAVE_PROC while the new name is a more
accurate description of what this function does.
Bart Van Assche [Sun, 23 Aug 2009 11:11:36 +0000 (11:11 +0000)]
Fixed a declaration: function attributes must be inserted after the return type instead of before, otherwise gcc 4.4 ignores the attribute declaration.
Bart Van Assche [Sun, 23 Aug 2009 09:53:27 +0000 (09:53 +0000)]
The configure-time test whether the proc filesystem is mounted (introduced
in r10156) broke cross-compilation. This patch converts the configure-time
test into a runtime test. Should fix bug #204843.
Bart Van Assche [Thu, 20 Aug 2009 06:07:10 +0000 (06:07 +0000)]
Removed the most recently added DRD suppression pattern (was added
to make drd/tests/qt4_mutex pass on Fedora 11 x86_64). Further
analysis has shown that this is an issue in libQtCore that should be
fixed instead of suppressed. Will file a bug report in the Fedora
bugzilla instead.
Tom Hughes [Tue, 18 Aug 2009 14:12:48 +0000 (14:12 +0000)]
The linker in Fedora Rawhide seems to be using ELFOSABI_LINUX as
the ABI in the ELF files it generates instead of ELFOSABI_SYSV as
has been used to date.
This was causing us to use the 64 bit backend to run 32 bit
programs as the launcher failed to identify them as 32 bit.
Vince Weaver [Tue, 18 Aug 2009 00:21:51 +0000 (00:21 +0000)]
Work around a binutils limitation on SuSE 9.1
by hand-coding the 32-bit fldcw instructions,
as the assembler gives an error when
trying to assemble them. The generated binary
is identical to one generated on a system
with working binutils.
Julian Seward [Mon, 17 Aug 2009 16:36:11 +0000 (16:36 +0000)]
Back out r10385 (Change demangler to not use excessive space from
stack) pending further investigations, as per discussion at
http://bugs.kde.org/show_bug.cgi?id=197988.
Julian Seward [Sun, 16 Aug 2009 22:56:53 +0000 (22:56 +0000)]
Comment that we never actually expect to see the string ]]> in a
generated suppression, and hence the problem of having to split it
into multiple CDATA blocks is moot.
Julian Seward [Sun, 16 Aug 2009 01:48:35 +0000 (01:48 +0000)]
ppc32-linux: di_notify_mmap: accept data sections mapped rwx as well as ones
mapped rw-. Fixes #190820. Really, this logic is still pretty ropey; we
could do a lot better here.
Fix the access_extended wrapper, which was rather broken. That's what I get
for not testing properly. Added a regtest for it too. Fixes bug 200760
(again, properly this time).
Julian Seward [Sat, 15 Aug 2009 22:41:51 +0000 (22:41 +0000)]
When generating XML output for suppressions, print the suppression
both wrapped up in XML tags (as before) but also in plain text in a
sequence of CDATA blocks. Normally only one, but in the worst case
the raw data will have ]]> in it, in which case it needs to be split
across two CDATA blocks.
This apparently simple change involved a lot of refactoring of the
suppression printing machinery:
* in the core-tool iface, change "print_extra_suppression_info" (which
prints any auxiliary info) to "get_extra_suppression_info", which
parks the text in a caller-supplied buffer. Adjust tools to match.
* VG_(apply_StackTrace): accept a void* argument, which is passed to
each invokation of the functional parameter (a poor man's closure
implementation).
* move PRINTF_CHECK into put_tool_basics.h, where it should have been
all along
* move private printf-into-an-XArray-of-character functions from
m_debuginfo into m_xarray, and make them public
* gen_suppression itself: use all the above changes. Basically we
always generate the plaintext version into an XArray. In text mode
that's just printed. In XML mode, we print the XMLery as before,
but the plaintext version is dumped into a CDATA block too.
* update the Protocol 4 specification to match all this.
This still isn't 100% right in the sense that the CDATA block data
needs to be split across multiple blocks if it should ever contain the
CDATA end mark "]]>". The Protocol 4 spec has this right even though
the implementation currently doesn't.
Bart Van Assche [Wed, 12 Aug 2009 12:55:56 +0000 (12:55 +0000)]
Suppressed compiler warnings reported by gcc 4.4.x on the source code
of regression tests about intentionally uninitialized variables and
about intentionally freed non-heap memory.
Bart Van Assche [Wed, 12 Aug 2009 09:44:43 +0000 (09:44 +0000)]
Added expected output for glibc 2.10 (Fedora 11). The test tc20_verifywrap2 has to be reviewed -- the results of this test depend on glibc internals, which is not good.
Add a crappy wrapper for access_extended(), one of the more ridiculous
syscalls I've had the displeasure of encountering. Due to its
ridiculousness, the wrapper misses a PRE_MEM_WRITE check and so can result
in false positives. The POST_MEM_WRITE update is present, though, so it
shouldn't cause subsequent problems. Fixes bug 200760.
Output tweaks:
- Always print a blank line after significant messages (eg. errors). This
makes the handling of blank lines much simpler.
- Don't print full stops at the end of messages. We mostly don't do it, so
I got rid of all the remaining ones I could find for consistency.
- Use --leak-check=full rather than --leak-check=yes, for consistency with
docs and other messages.
- Update partiallydefinedeq.stderr.exp2 for older changes.
This commit only updates the code. Test updates will follow shortly. (I'm
separating them so the code changes aren't swamped by the test changes in
the SVN logs.)
Callgrind: Fix printing of "Summary:" line in finish()
The global cost counters, which are used for printing the
summary line, where zeroed before in init_exec_state(), called
by unwind_thread().
Stack unwinding (i.e. unwind_thread) is also done at instrumentation
state changes, and there, we want the cost counters to be zeroed
(was fix for bug 150606). Do this explicitly now.
PS: The correct fix for bug 150606 is not to zero the cost counters
(we do not really want this at instrumentation state changes), but
to store the current counter values in a "last_instr_state_on_cost"
counter, and use this as the global cost counter on enter for functions
which are left but were not detected to be entered.
Fix dumping of call cost in tail recursion optimization
When tail recursion optimization is detected (i.e. a jump to the
beginning of the function without creating a new stack frame),
Callgrind collects this as real call (ie. calculates inclusive
call costs), but forgot to dump the call information (the call
type is still left as a jump).
Fixed by also dump call information if inclusive cost is >0.