Commit Graph

3076 Commits

Author SHA1 Message Date
Julian Seward
c2de8fa58b Suppress stack-switching message in XML mode.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8012
2008-05-06 21:01:19 +00:00
Julian Seward
35695d8b1a Un-break signal frame delivery on ppc64 following recent Memcheck
origin tracking changes.  This is believed to fix #161628.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8011
2008-05-06 18:14:27 +00:00
Julian Seward
f9f7ad0a45 Make sure sp[0] and fp[0] are set in a rarely-taken path. Thanks to
Bart for spotting this.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7994
2008-05-02 22:27:07 +00:00
Julian Seward
3c25a48a0c Temporarily work around compilation failures caused by non-definition
of __NR_timerfd, pending proper resolution.  See
http://bugs.kde.org/show_bug.cgi?id=160907



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7983
2008-05-01 21:22:38 +00:00
Julian Seward
4cae5c3ed5 Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output.  This
will be fixed.

The core-tool interface is slightly changed.  The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982
2008-05-01 20:24:26 +00:00
Bart Van Assche
bcb85a68fb Make sure the test for kernel version 2.6.22 will work correctly for the future kernel versions 2.6.220 .. 2.6.229.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7971
2008-05-01 12:35:48 +00:00
Bart Van Assche
c6d4c09e7c Added support for timerfd_create(), timerfd_gettime() and timerfd_settime() system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7942
2008-04-27 12:56:06 +00:00
Bart Van Assche
46fd0e3040 Enabled syslog and create_module system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7920
2008-04-26 10:57:07 +00:00
Bart Van Assche
e31611fb5c Added support for epoll_pwait(), utimensat(), eventfd(), timerfd() and signalfd(). Fixes bug 160907.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7917
2008-04-26 07:45:10 +00:00
Bart Van Assche
2497cadb85 Refined mallinfo() implementation (contributed by Eugene Toder).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7901
2008-04-21 17:28:50 +00:00
Bart Van Assche
2a7b4f5bd5 Added mallinfo() implementation based on patch by Eugene Toder (see also bug 160956).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7888
2008-04-19 14:43:30 +00:00
Bart Van Assche
18ca08e920 Fixed compiler warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7884
2008-04-16 18:49:11 +00:00
Julian Seward
d1074cd2af Remove VG_ prefixing from static (non-exported) functions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7876
2008-04-14 20:30:34 +00:00
Bart Van Assche
366ad62a46 Extended VG_(message)() buffer from 100 to 128 characters. Made sure that lines printed by different threads are not mixed up in the output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7875
2008-04-14 16:35:32 +00:00
Bart Van Assche
cf45f897a6 Only read debug information from regular files, and not from device nodes. Do not complain on files for which we do not have read access.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7862
2008-04-09 16:21:34 +00:00
Bart Van Assche
f760d16eb7 Added VG_(thread_get_stack_size)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7799
2008-03-29 09:25:53 +00:00
Bart Van Assche
7d42280fc1 Fixed a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7798
2008-03-29 09:25:11 +00:00
Bart Van Assche
f2526f4f35 Moved macro's that specify branch prediction hints to include/pub_tool_basics.h
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7745
2008-03-22 08:04:29 +00:00
Julian Seward
81663bc4b7 Kludgily fix a regression caused by the recent DATASYMS merge, which
caused V to hang when running Amarok in KDE 3.5.X.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7723
2008-03-17 16:23:54 +00:00
Julian Seward
5a233d645a Merge, from branches/HGDEV, r7604 and r7609 (Try to address
performance problems resulting from increased searching of the stacks
list.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7645
2008-03-12 00:14:01 +00:00
Julian Seward
56b0448a64 Handle DW_OP_deref.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7597
2008-03-08 10:44:39 +00:00
Julian Seward
18a72f705c Try to handle the situation where an object is first split into a base
object (without D3 info) and a debuginfo (with D3 info), and then the
base object is prelinked to some nonzero address, but the debuginfo
object is left unchanged.  A nasty and unprincipled hack.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7590
2008-03-07 22:17:31 +00:00
Julian Seward
3f577414fe Handle DW_FORM_data8.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7589
2008-03-07 20:07:58 +00:00
Julian Seward
8c1638a9ed Don't tell m_redir (and the user) that debuginfo is about to be
discarded if in fact we never got as far as reading anything into
DebugInfo.  This unbreaks self-hosting.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7579
2008-03-06 18:31:42 +00:00
Julian Seward
efefa3830e VG_(get_strace_wrk): don't segfault in the degenerate case fp_min =
fp_max_orig = 0.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7551
2008-03-03 22:20:51 +00:00
Bart Van Assche
99e2db5631 Compiles now with gcc 2.96 too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7550
2008-03-03 20:40:51 +00:00
Julian Seward
50a23bf861 Don't be quite so paranoid about rejecting symbols that fall outside
the .text segment.  Instead only reject ones that fall outside the r-x
area.  This is in line with r7427, which instituted such a change in
other places in the system.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7546
2008-03-03 15:51:58 +00:00
Nicholas Nethercote
fcb6ba0407 update comments
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7543
2008-03-03 02:15:03 +00:00
Julian Seward
14af4957fc Merge in the DATASYMS branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540
2008-03-03 01:35:41 +00:00
Bart Van Assche
e8e47e4461 Added const keyword to second argument of VG_(OSetGen_Remove)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7436
2008-02-23 19:04:44 +00:00
Tom Hughes
34d1e3b268 Always call ML_(generic_POST_sys_shmat) when a shmat call succeeds, even
if the memory was attached at address zero. Fixes bug #157665.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7399
2008-02-11 14:47:05 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
7cebb7d626 Include headers for VG_(register_stack) calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7396
2008-02-11 11:23:12 +00:00
Tom Hughes
2e55cfac69 Make the clone system call wrappers call VG_(register_stack) to record
the new thread's stack, then make the stack unwinder use that information
to make a better guess at the stack bounds.

This helps avoid crashes trying to unwind the stack under wine when
the starting point is a routine without a proper stack frame.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7383
2008-02-08 15:17:07 +00:00
Julian Seward
9c149e9981 Fix inconsistent order of fields. I think this is purely aesthetic
since nothing depends on the actual layout of this struct, but anyway.
Noticed by Vinay Nallamothu.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7352
2008-01-17 14:37:24 +00:00
Julian Seward
61b40d2d66 Handle DW_OP_plus_uconst. Possibly fixes #155091 (not yet confirmed
by reporter).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7347
2008-01-14 12:04:11 +00:00
Julian Seward
c798246fb2 Enable some syscalls needed to run firefox on 64-bit ppc on Fedora 8.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7334
2008-01-09 22:01:40 +00:00
Julian Seward
443b85bdee Move VG_(clo_backtrace_size) to a tool-visible header file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7331
2008-01-09 18:37:41 +00:00
Tom Hughes
b67822d578 If we don't find the address in the segInfo list that ask the address
space manager for the name of the file it was mapped from as a fallback
solution.

This allows us to print the names of exe/dll files in the stack trace
when running programs under wine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7327
2008-01-08 17:44:04 +00:00
Tom Hughes
4ad22500c0 Made the argument to VG_(am_get_filename) const as it doesn't need
to be modified and the routine to find the segment for an address now
returns a const pointer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7325
2008-01-08 16:48:30 +00:00
Tom Hughes
cbb3cb05a5 Add support for the sync_file_range system call.
Based on patch from Russell Sears <sears@cs.berkeley.edu>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7324
2008-01-08 16:31:25 +00:00
Tom Hughes
e25736ec6c Valid file descriptor argument to llseek system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7322
2008-01-08 13:54:43 +00:00
Tom Hughes
d3def869f3 Mark the main thread as running while the initial memory declarations
are made to the tool so that the tool can associate that memory with
the main thread if it wishes.

Also cleanup existing hacks in the drd tool which worked around the
fact that the core did not set the current thread while declaring the
initial memory.

Path from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7310
2008-01-02 10:13:04 +00:00
Tom Hughes
3f4849d83f Add const qualifiers to appropriate arguments of OSet routines.
Patch from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7308
2007-12-30 12:28:26 +00:00
Julian Seward
9009dc75bf Comment-only change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7307
2007-12-22 14:14:04 +00:00
Julian Seward
652c5531b1 AIX5 counterpart to r7302: Improve handling of programs which require
very large main thread stacks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7306
2007-12-22 14:12:42 +00:00
Tom Hughes
690019c337 Propagate the ucontext information with a received signal to the
signal frame constructors and use it (on x86 and amd64) to fill in
the trap number in the signal context information.

Needed for wine which likes to look at the trap number...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7305
2007-12-21 10:24:24 +00:00
Julian Seward
da0726854c Add a new method VG_(record_depth_1_ExeContext), a trivial derivative
of VG_(record_ExeContext), which just records the first stack frame
but does not attempt to unwind the (guest) stack.  This is useful in
situations where we suspect unwinding the stack might cause a
segfault.

Use this in m_signals, when getting a backtrace following a guest
segfault.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7304
2007-12-21 01:24:59 +00:00
Julian Seward
4f282e99ce Improve handling of programs which require very large main thread
stacks.  Instead of hardwiring the main thread stack to a max of 16MB
and segfaulting the app beyond that point, allow the user to specify
the main stack size using the new flag --main-stacksize=<number>.

If said flag is not present, the current default, which is "MIN(16GB,
current ulimit -s value)", is used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7302
2007-12-18 01:49:23 +00:00
Julian Seward
bfb682b18c Print a nice message if allocation of the stack fails, rather than just
asserting.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7301
2007-12-15 23:08:35 +00:00