572 Commits

Author SHA1 Message Date
Julian Seward
a1289fb4ca Bump the core/tool iface version number, since the just-merged-in
changes for Memcheck origin tracking change the interface (slightly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7984
2008-05-01 21:43:17 +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
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
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
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
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
Bart Van Assche
5281f69053 Enable compile-time format string checking by gcc if the macro CHECK_FORMAT_STRINGS has been defined before this file has been included.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7731
2008-03-17 18:57:03 +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
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
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
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
cc3aba0192 Update linux system call lists based on 2.6.23.1 kernel source.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7323
2008-01-08 16:10:47 +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
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
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
37742f8d11 Don't do comparisons of (signed) Words by merely subtracting them, as
this does not always produce correct results.  Instead use a slower
but correct method.  Fixes #147545.  (Nick Nethercote, Tom Hughes et
al)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7283
2007-12-09 02:08:42 +00:00
Nicholas Nethercote
d17c45b9d1 Document flakiness of NON_SIMD_CALL* in comments and the manual.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7279
2007-12-05 21:51:50 +00:00
Julian Seward
d19b3f97a8 Futz with headers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7264
2007-12-02 02:06:46 +00:00
Julian Seward
9ad4d494fa New options for Memcheck, --malloc-fill=<hexnumber> and
--fill-free=<hexnumber>, which cause malloc'd(etc) and free'd(etc)
blocks to be filled with the specified value.  This can apparently be
useful for shaking out hard-to-track-down memory corruption.  The
definedness/addressability of said areas is not affected -- only the
contents.  Documentation to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7259
2007-11-30 21:41:40 +00:00
Julian Seward
f5adf7f83a Get rid of VG_NUMW_CLO, as it is pretty much identical to VG_NUM_CLO,
and only used in one place.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7257
2007-11-30 17:50:44 +00:00
Nicholas Nethercote
79d4505e99 Back out r7221, which was incorrect.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7224
2007-11-26 02:55:12 +00:00
Nicholas Nethercote
73f9cade8f Fix NUM_CLO checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7221
2007-11-26 00:00:32 +00:00
Julian Seward
54e5bf2856 Misc changes needed to support exp-drd (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7213
2007-11-25 14:08:53 +00:00
Julian Seward
931a40e83b Core-tool iface changes needed to support exp-drd (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7212
2007-11-25 14:06:06 +00:00
Nicholas Nethercote
4d236e4fb2 Tweak VG_(expand_file_name), as per Josef's suggestions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7204
2007-11-23 22:37:35 +00:00
Nicholas Nethercote
d6b40a390d Fixed up the log file mess throughout, including the docs. This killed
--log-file-qualifier and --log-file-exactly.

Updated NEWS some in preparation for 3.3.0.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7202
2007-11-23 01:41:32 +00:00
Nicholas Nethercote
4481b0b4be Add support for %q in --massif-out-file. Todo: use this mechanism for the
core and Cachegrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7200
2007-11-22 23:01:59 +00:00
Julian Seward
4d601bfed7 Support sys_utimensat on x86-linux. (Dan McGee)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7195
2007-11-20 23:41:23 +00:00
Julian Seward
4044188f76 Add support for private futexes (whatever they might be). Patch from
Eric Dumazet.  Fixes #146781.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7169
2007-11-17 01:35:08 +00:00
Nicholas Nethercote
b8e2d6e145 - Make other integer CLO macros more correct, as I did for VG_NUM_CLO in the
last commit.
- Add a VG_DBL_CLO for fractional arguments.
- Make Massif's --threshold and --peak-inaccuracy arguments fractional.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7150
2007-11-11 22:15:58 +00:00
Nicholas Nethercote
13c597f709 Add four 'strtoll' variants, which are like 'atoll' but let you detect if
the string converted wasn't entirely numeric.  Using them for numeric
command-line options -- previously if you had a option "--foo=<n>", where
<n> is supposed to be an integer, then "--foo=blah" would be interpreted as
"--foo=0", because the "blah" would be converted to zero and the remaining
chars wouldn't be noticed.

Fixed an incorrect command-line option in two massif tests that this change
exposed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7149
2007-11-11 21:58:21 +00:00
Julian Seward
caa1e5d417 Fix bogus grammar in r7139.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7140
2007-11-10 22:19:42 +00:00
Julian Seward
88c1e8eb76 Clarify reason for existence of track_pre_thread_ll_create/_exit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7139
2007-11-10 22:13:03 +00:00
Nicholas Nethercote
d95559802b Changed Massif to record the 'slop' heap bytes caused by rounding asked-for
sizes up to a multiple of 8 (or whatever --alignment is).  This is combined
with the "admin" bytes, resulting in the "extra" bytes.  Added
VG_(malloc_usable_size) to the tool interface to support this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7133
2007-11-10 04:08:08 +00:00
Julian Seward
6e9e59f46b Allow VG_(atoll16) to accept a leading "0x".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7125
2007-11-09 23:25:46 +00:00
Julian Seward
06666933d9 Merge (from branches/THRCHECK) the following two changes to the core-tool
interface:

r6805: Modify two thread-notification events in the core-tool
interface.  This removes track_post_thread_create and
track_post_thread_join.  The core can only see low level thread
creation and exiting, and has no idea about pthread-level concepts
like "pthread_create" and "pthread_join", so these are a bit
ambiguous.

Replace them with track_pre_thread_ll_create, which is notified before
a new thread makes any memory references, and
track_pre_thread_ll_exit, which is notified just before the new thread
exits, that is, after it has made its last memory reference.

r6823: Core-tool interface: give 'needs_tool_errors' an extra Boolean
indicating whether or not the core should print thread id's on error
messages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7123
2007-11-09 23:21:44 +00:00
Julian Seward
4478efba98 Oops, this was missed out of r7118 (Merge (from branches/THRCHECK) the
following amd64-linux stack unwind kludges)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7122
2007-11-09 23:16:11 +00:00
Julian Seward
0babc91f2f Merge r6806 from branches/THRCHECK:
Fix longstanding error in the amd64-linux function-wrapping macros:
protect the caller's red zone across the hidden call.  All rather
nasty as explained in big comment.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7120
2007-11-09 23:09:50 +00:00
Julian Seward
75fd9878c9 Merge (from branches/THRCHECK) the following amd64-linux stack unwind
kludges^H^H^H^H^H^H^Henhancements:

r6802: For VG_(record_ExeContext) et al, add a new parameter
(first_ip_delta) which is added to the initial IP value before the
stack is unwound.  A safe value to pass is zero, which causes the
existing behaviour to be unchanged.  This is a kludge needed to work
around the incomplete amd64 stack unwind info in glibc-2.5's clone()
routine.

r7059: Add a last-ditch heuristic-hack to the amd64-linux stack
unwinder, which is used when all other methods fail.  Seems like GDB
has something similar.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7118
2007-11-09 23:02:28 +00:00
Dirk Mueller
e0e03a6d73 revert format checking warnings from trunk, will
be done in a branch


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6947
2007-10-04 21:35:21 +00:00
Dirk Mueller
3bcfe33127 add format argument checking. might find useful portability issues
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6909
2007-09-24 13:25:24 +00:00
Nicholas Nethercote
2455b7eaf8 Add VG_(atoll).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6899
2007-09-22 06:23:07 +00:00
Nicholas Nethercote
0974a299f5 Split the OSet interface into two parts: "OSetGen_", which is the existing
interface and provides full power;  and "OSetWord_", which is an
easier-to-use interface for if you just want to store words.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6841
2007-09-17 05:30:48 +00:00
Nicholas Nethercote
e19e539d18 remove dead declaration
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6838
2007-09-17 00:33:52 +00:00
Julian Seward
4f00b6d36d Make the --max-stackframe machinery 64-bit clean.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6788
2007-08-28 17:03:01 +00:00
Julian Seward
0ed8fc0ce0 Merge, from CGTUNE branch, a cleaned up version of r6742:
Another optimisation: allow tools to provide a final_tidy function
which they can use to mess with the final post-tree-built IR before it
is handed off to instruction selection.

In memcheck, use this to remove redundant calls to
MC_(helperc_value_check0_fail) et al.  Gives a 6% reduction in code
size for Memcheck on x86 and a smaller (3% ?) speedup.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6787
2007-08-28 06:05:20 +00:00
Julian Seward
0e70d01bdd Changes to m_hashtable:
Allow hashtables to dynamically resize (patch from Christoph
Bartoschek).  Results in the following interface changes:

* HT_construct: no need to supply an initial table size.
  Instead, supply a text string used to "name" the table, so
  that debugging messages ("resizing the table") can say which
  one they are resizing.

* Remove VG_(HT_get_node).  This exposes the chain structure to 
  callers (via the next_ptr parameter), which is a problem since
  callers could get some info about the chain structure which then
  changes when the table is resized.  Fortunately is not used.

* Remove VG_(HT_first_match) and VG_(HT_apply_to_all_nodes) as
  they are unused.

* Make the iteration mechanism more paranoid, so any adding or
  deleting of nodes part way through an iteration causes VG_(HT_next)
  to assert.

* Fix the comment on VG_(HT_to_array) so it no longer speaks 
  specifically about MC's leak detector.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6778
2007-08-25 07:19:08 +00:00
Julian Seward
32a6fb4fec Get rid of VG_(getcwd) and replace it with a pair of functions,
VG_(record_startup_wd) which records the working directory at startup,
and VG_(get_startup_wd) which later tells you what value was recorded.
This works because all uses of VG_(getcwd) serve only to record the
directory at process start anyway.  The motivation is that AIX does
not support sys_getcwd directly, so it's easier for the launcher to
ship in the required value using an environment variable.  On Linux
sys_getcwd is used as before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6764
2007-07-09 23:13:07 +00:00