109 Commits

Author SHA1 Message Date
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Julian Seward
7b33a9428e Update filter for Ubuntu 10.04.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11444
2010-10-14 10:46:56 +00:00
Julian Seward
0e140511b6 Changes to make exp-ptrcheck work reasonable on Fedora 14 x86:
* looks_like_a_pointer: x86-linux: halve lower threshold value
  to take account of evident address space randomisation done
  by Fedora 14 on x86

* handle __NR_lgetxattr

* move __NR_mq_* entries to the correct place (tidyup only)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11435
2010-10-12 22:47:09 +00:00
Julian Seward
b01f20803e Handle mq_* syscalls. Fixes #243884. (David Fenger, dkfenger@gmail.com)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11396
2010-10-06 11:25:29 +00:00
Bart Van Assche
921d72acf4 Follow-up for r11360.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11362
2010-09-18 09:37:07 +00:00
Bart Van Assche
d4a0dd3995 Skip exp-ptrcheck regression tests on PowerPC and ARM. Based on a patch by
Maynard Johnson -- see also #247526.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11360
2010-09-18 08:34:33 +00:00
Julian Seward
5e6248c7ed Merge from branches/THUMB: tool-side handling of new primops required
for NEON support.  Requires further checking.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11277
2010-08-22 11:54:14 +00:00
Julian Seward
64fcacf70d Add an intercept for strpbrk (copied from Memcheck).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11273
2010-08-21 09:04:38 +00:00
Julian Seward
6670b778ad Intercept strstr, required on SSE4 capable Linux targets.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11271
2010-08-20 18:25:15 +00:00
Julian Seward
480294a05f Add more intercepts for strcpy, strncmp, strcmp, so as to reduce the
noise level on Ubuntu 10.04 64-bit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11261
2010-08-16 22:56:16 +00:00
Julian Seward
0422e25058 Handle sys_ioperm on Linux. Fixes #237723.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11232
2010-07-29 05:18:09 +00:00
Julian Seward
fd8bfa84fb Handle (on Linux) syscalls: sendfile, setgid, setgroups. Fixes
#242606 and #244009.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11216
2010-07-21 10:03:49 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Julian Seward
05124264b0 Remove link_tool_exe.c and replace it with perl scripts that do the
same thing.  A .c file doesn't work for cross compilation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11174
2010-06-13 22:13:58 +00:00
Julian Seward
c46347280b 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.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11141
2010-06-02 00:31:34 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Tom Hughes
527f6b5315 Enabled getsid in ptrcheck. Fixe #230593.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11092
2010-03-14 15:53:53 +00:00
Tom Hughes
0ac31a3164 Add mlockall support to ptrcheck. Closes #230020.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11086
2010-03-09 11:23:19 +00:00
Julian Seward
7f29de871f Handle sys_inotify_init1.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11043
2010-02-15 09:58:10 +00:00
Julian Seward
daf8048ea3 Add some intercepts to make Ptrcheck usable-ish on Ubuntu 9.10 (amd64).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11042
2010-02-15 09:57:49 +00:00
Julian Seward
88b497ecdf Make Callgrind, DRD and Ptrcheck build on arm-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10985
2010-01-01 18:31:41 +00:00
Julian Seward
7ed620741c Track changes in the names of a few IR primops to do with int<->fp
conversions, as introduced in vex r1949.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10980
2009-12-31 19:24:12 +00:00
Julian Seward
be9f7279ce Track vex r1930 (Change the IR representation of load linked and store
conditional.)  Completes the fix of #215771.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957
2009-11-26 17:20:21 +00:00
Tom Hughes
262de8335d Support pipe2 in exp-ptrcheck. Fixes #212739.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10924
2009-11-03 21:02:16 +00:00
Tom Hughes
77655c4f0e Add epoll_ctl, epoll_pwait and epoll_wait to exp-ptrcheck. Fixes #207668.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10908
2009-10-27 09:31:39 +00:00
Julian Seward
ffaaef1cbc Remove ampersand from tool description string so as not to screw up
XML output.  (Ashley Pittman).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10882
2009-09-03 10:41:44 +00:00
Julian Seward
5b1edb07f6 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.

Fixes #191189.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10822
2009-08-15 22:41:51 +00:00
Nicholas Nethercote
86be4a7cf3 Update .exp files for r10783.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10784
2009-08-12 00:14:44 +00:00
Nicholas Nethercote
4e495edf4a Make "option" terminology consistent some more. Also tweaked the mempool
Memcheck section a little.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10759
2009-08-10 01:29:14 +00:00
Julian Seward
8ffe2fdefa Tidy up of messaging:
* For all tools and the core, don't show statistics when -v is in
  effect.  Instead, try to restrict -v to mostly user-useful
  stuff.

* A new flag --stats=no|yes [no] produces statistics output instead.

* Fix longstanding problem in that Memcheck's leak checker ran after
  the core's error manager module shut down, thereby not showing use
  counts of leak suppressions.  This fixes #186790.

* As a consequence, the leak checker text output of Memcheck has
  changed a bit -- leak check is done before the final error
  summary is done (much more logical), and the output has been
  tidied up a bit.

* Helgrind, Drd and Ptrcheck now also print "For counts of
  detected and suppressed errors, rerun with: -v", which makes
  them consistent with Memcheck in this regard.  These are
  filtered out by the regtest filter scripts.

For all tools except Memcheck, the regtests are unchanged.  On
Memcheck regtests still fail due to rearrangements of the leak
checker output.  This will be fixed by a followup commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10746
2009-08-07 15:46:56 +00:00
Nicholas Nethercote
dbcea71779 More docs build tweaks:
- Actually remove the dead docs/images/massif*.png files (this was meant to
  happen in r10720).

- Inline $TOOL/docs/Makefile.am into $TOOL/Makefile.am for all 10 tools.  10
  fewer Makefile.am files FTW!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10721
2009-08-05 08:08:18 +00:00
Nicholas Nethercote
368c05d77d Tweaks to Ptrcheck's manual chapter.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10718
2009-08-05 07:15:28 +00:00
Nicholas Nethercote
8026c4766f Various option-related tweaks:
- Match the ordering of the non-tool-specific options in the usage message
  with the order in the user manual.  As a result, we now always print
  --alignment and --trace-malloc in the core's usage messages, which saves
  malloc-replacing tools from doing it themselves (and brings it in line
  with options that only apply to error-collecting tools).

- Improved the presentation of the Vex options with --help-debug.

- Removed documentation of -d in the manual because it's a debugging-only flag.

- Documented --read-var-info in the manual.  This fixes bug 201169.

- Renamed --auto-run-dsymutil as --dsymutil and documented it in the usage
  message.

- Fixed an XML error in manual-core-adv.xml.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10703
2009-08-04 02:32:55 +00:00
Nicholas Nethercote
9c4252c6a1 Don't wrap the "Command:" line, as doing so makes cutting-and-pasting the
command difficult.  Also, when wrapping I was failing to factor in the
escape chars needed for chars like ' ';  now I don't need to.  And this
means the 'long-command' test is no longer necessary.  In other words,
favour utility and simplicity over aesthetics.

Also, the "Command:" line wasn't being wrapped in <line></line> in XML
output.  It now is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10699
2009-08-04 00:27:56 +00:00
Nicholas Nethercote
5fd200e8a2 Avoid ampersands that seem to be causing XML-to-PDF conversion troubles.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10666
2009-07-30 22:21:24 +00:00
Nicholas Nethercote
ac7761261a We currently use a mix of <option> and <computeroutput> tags for command
line options.  This commit changes them to all <option>.

Also make consistent how options with multiple names (eg. -h --help) are
shown.

Also, remove section describing --help and --version in Callgrind's chapter;
these aren't necessary and are presumably a hangover from when Callgrind was
a separate tool.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10659
2009-07-30 02:57:52 +00:00
Nicholas Nethercote
78b2e5c83e Started overhauling the documentation:
- There were detailed descriptions of all the tools in the Quick Start
  Guide, the Manual introduction, and the start of each tool chapter.  To
  avoid duplication/overlap, I removed these altogether from the Quick Start
  Guide, and shortened them in the intro.

- Improved the description of what errors Memcheck can find.

- Made all tool chapters start with "Overview" section, for consistency.

- Made the "run with --tool=XXX" bit consistent in each tool chapter.

- Made all tool chapter titles match the description given when running them.

- Added BBV to the User Manual intro.

- Generally clarified, updated, and future-proofed various bits of text in
  the Quick Start Guide and User Manual introduction. 

Also:
- Changed Nulgrind's start-up description to "the minimal Valgrind tool".

- Fixed some punctuation in the usage message.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10652
2009-07-29 02:36:21 +00:00
Tom Hughes
7e1ba6bac4 Support epoll_create and epoll_create1 in ptrcheck. Fixes #189762.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10635
2009-07-27 14:22:25 +00:00
Bart Van Assche
2919d92191 Fixed a bug in the code for reading suppression files: the line numbers
reported in error messages were not correct. As an example, the following
output was produced before this patch (not correct):
$ ./vg-in-place --tool=helgrind --num-callers=1 /bin/true
...
FATAL: in suppressions file ".in_place/default.supp" near line 893:
   suppression must contain at least one location line which is not "..."
exiting now.
$ ./vg-in-place --tool=drd --num-callers=1 /bin/true
FATAL: in suppressions file ".in_place/default.supp" near line 475:
   suppression must contain at least one location line which is not "..."
exiting now.

After having applied this patch the above commands display line numbers
1104 and 619, referring to the first suppression pattern containing
three dots for the topmost stack frame, as expected.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10632
2009-07-27 12:03:03 +00:00
Nicholas Nethercote
68efb29503 A fix for bug 186796: suppression symbol names were being truncated if they
were longer than 200 chars.  Now dynamic memory is used and so they can be
arbitrarily long in theory, although in practice it bombs out at 100,000 for
sanity purposes.  This required adjusting the core/tool interface for
read_extra_suppression_info().  


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10581
2009-07-24 07:38:29 +00:00
Tom Hughes
b1bc437072 More ptrcheck system calls. Fixes #187416
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10481
2009-07-16 08:47:08 +00:00
Nicholas Nethercote
452f68ef30 Update expected output for shorter preamble.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10480
2009-07-15 22:12:24 +00:00
Tom Hughes
01b255cdac Add some more system calls to exp-ptrcheck. Closes #186507 and #197966.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10479
2009-07-15 16:05:05 +00:00
Julian Seward
97c1ddae79 Merge exp-ptrcheck/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10469
2009-07-15 14:50:22 +00:00
Julian Seward
e3c61c642f Fix breakage on ppc{32,64}-linux in post_reg_write_nonptr following
r10084 and also update a comment.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10439
2009-07-13 10:00:06 +00:00
Julian Seward
d8898802fc Track vex r1907 (introduce Iop_CmpCas{EQ,NE}{8,16,32,64} and use them
for CAS-success? tests).

Detailed background and rationale in memcheck/mc_translate, comment
"COMMENT_ON_CasCmpEQ".

This commit changes the Memcheck instrumentation of IRCAS so as not to
do a definedness check on the success/failure indication.  Also, by
being able to identify via the Iop_CasCmpEQ primitives any such checks
independently created by front ends, it can avoid instrumenting these
too.

All this is to avoid reporting new false positives observed on Fedora 7
(x86?) and openSUSE 10.2 (x86) following the recent merge of branches/DCAS.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10432
2009-07-12 13:00:17 +00:00
Julian Seward
4b19c85350 Add support for IRStmt_CAS to the h_ instrumenter. This should stop
exp-ptrcheck asserting on threaded programs on x86 and amd64.  Vast
amounts of fiddly complication that makes my head hurt.  Urr.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10418
2009-07-09 10:52:03 +00:00
Julian Seward
338cd1a59a Liberalise IRTemp bookkeeping in the h_ instrumenter, so as to allow
addition of non-shadow IRTemps without causing it to collapse into
assertion failures.  This changes is a simplified version of what was
committed in
svn://svn.valgrind.org/valgrind/branches/DCAS/memcheck/mc_translate.c
r10109.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10417
2009-07-09 10:45:11 +00:00
Julian Seward
3109865279 Merge in branches/DCAS.
This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901.  They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392
2009-07-01 08:10:49 +00:00
Nicholas Nethercote
512909dd91 Fix 'make check' for automake-1.7. Fixes bugs 197898 and 197901.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10378
2009-06-25 23:46:23 +00:00