Commit Graph

3678 Commits

Author SHA1 Message Date
Julian Seward
2146140b60 Fix link flags so that 'vgdb' can be built on x86-darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11735
2011-05-09 21:33:32 +00:00
Julian Seward
f83e5835b1 read_dwarf2_lineblock: debug printing fix (no functional change)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11733
2011-05-09 09:19:32 +00:00
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00
Julian Seward
29c20eaeb0 setup_client_stack: use have_exename to consistently guard uses
of VG_(args_the_exename), thereby avoiding a potential segfault.
Spotted by IBM's BEAM checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11724
2011-05-04 09:07:38 +00:00
Julian Seward
1ccdd881a6 calling format_message: when passing frameNo == -1, also pass
tid == VG_INVALID_THREADID rather than an uninitialised ThreadId.
Also in format_message, improve precondition assertions for
frameNo and tid.

There's no error in the current code since if frameNo == -1 then
tid is unused, but it caused IBM's BEAM checker to complain.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11723
2011-05-04 09:06:17 +00:00
Julian Seward
a31f76b8fc handle_maybe_load_notifier: assert when symbol == NULL rather than
segfaulting.  Potential segfault was found by IBM's BEAM checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11722
2011-05-04 09:03:41 +00:00
Julian Seward
8911c2ffa5 VG_(env_unsetenv), VG_(env_clone): add assertions so as to cause
assertions instead of segfaults.  Potential segfaults were detected by
IBM's BEAM checker.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11721
2011-05-04 09:01:58 +00:00
Julian Seward
555e3b2ccb arm-linux: Set _start symbol alignment and type. Bug 266035 comment 1.
(Jeff Brown, jeffbrown@google.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11720
2011-05-03 14:24:11 +00:00
Bart Van Assche
fbdd04d5a9 syswrap/Linux: trace ioctl() calls only once / do not report two-argument
ioctl() calls as an error. Patch provided by Mark Hills. Closes #272730.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11717
2011-04-28 18:36:49 +00:00
Julian Seward
5e6d4577de Change the TT_FAST hash function for from "insn_address >> 2" to
"insn_address >> 1".  The former is appropriate for ARM code, where
all insns are 4-sized and 4-aligned, but not for Thumb code, where the
minimum size and alignment is 2.  The old scheme happened to work for
Thumb (indeed, any hash function would), but caused huge amounts of
conflict misses in the fast cache for some programs.

The change has been observed to reduce conflict misses by up to 100
times, and in some cases, improves performance significantly for Thumb
code.  Performance of ARM code is unchanged or possibly a bit worse.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11716
2011-04-28 14:58:15 +00:00
Julian Seward
6045181f3c Change the default (minimum) client malloc alignment from 8 to 16
on ppc32-linux.  This is needed to make Altivec-using code work
correctly.  Noticed when running ./auxprogs/gsl16test with gcc-4.6
with args -mcpu=970 -g -O3 -ftree-vectorize on Memcheck, in
which case a few of the tests failed because malloc() returns
8 byte aligned memory when it should return 16-aligned memory.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11715
2011-04-27 23:25:15 +00:00
Robert Walsh
7671cab5c8 Fix no-arg ioctls on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11714
2011-04-27 19:04:31 +00:00
Julian Seward
482237674c s390x: fpr - gpr transfer facility -- valgrind side fixes,
and test cases.  Fixes #268619.
(Florian Krohm, britzel@acm.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11713
2011-04-27 12:00:51 +00:00
Julian Seward
f06f0f7185 Fix a couple of bogus asm constraints observed when trying to build
V with clang-2.9.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11707
2011-04-26 07:52:44 +00:00
Julian Seward
b1a118436a Make reading of line number info from LLVM-2.9-generated Dwarf3 work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11705
2011-04-21 08:55:51 +00:00
Bart Van Assche
d077061870 Linux/syswrap: add support for USBDEVFS_RESET (patch contributed by Brad Hards <bradh@frogmouth.net>).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11702
2011-04-18 10:37:56 +00:00
Julian Seward
fce26577fc Fix bogus .size directives which are now rejected by binutils 2.21.
Fixes #271043.  (Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11700
2011-04-15 21:21:27 +00:00
Julian Seward
8dd8315914 Add support for IBM Power ISA 2.06 -- stage 1. Valgrind-side changes
and test cases. Bug #267630 and followup fix #270794.
(Maynard Johnson, maynardj@us.ibm.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11697
2011-04-15 11:57:05 +00:00
Julian Seward
7681f394c3 s390x: reconsider "long displacement" requirement -- hwcaps detection
changes.  See #268620.  (Florian Krohm, britzel@acm.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11695
2011-04-13 15:40:10 +00:00
Julian Seward
7e54c5b2ca Get rid of shadowing causing a perl warning. Minor fallout from
r11686.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11691
2011-04-11 22:14:03 +00:00
Julian Seward
945eccc8e4 Make MacOS builds work again following fixes for #259977
(revs 11687,8,9)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11690
2011-04-11 22:08:06 +00:00
Julian Seward
e5a3e4f014 Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.
(modified version of patch from Maynard Johnson <maynardj@us.ibm.com>)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11689
2011-04-11 21:26:27 +00:00
Julian Seward
c2120cadde Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11688
2011-04-11 18:36:34 +00:00
Julian Seward
b3827d6c33 Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687
2011-04-11 16:17:51 +00:00
Julian Seward
dca5c116bb On OSX, post-process the tool executables to adjust the Mach-O headers
in certain circumstances.  This works around a bug in the linker that
ships in Xcode 4.0.0 and 4.0.1 causing the 64-bit tool executables to
segfault at startup.  Fixes #267997.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11686
2011-04-06 11:17:16 +00:00
Julian Seward
adb0e3b18d Remove a bunch more warnings generated by gcc-4.6 about dead
assignments ("[-Wunused-but-set-variable]"), on ppc32-linux and
ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11674
2011-03-28 20:33:52 +00:00
Julian Seward
9c6d0dc9c9 Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673
2011-03-28 16:26:42 +00:00
Julian Seward
dc53563392 Intercept strlen in ld.so on x86. Fixes #266961.
(Jakub Jelinek, jakub@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11668
2011-03-28 08:22:55 +00:00
Bart Van Assche
9df672f236 Add VALGRIND_RESIZEINPLACE_BLOCK() and hence close #267819.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11666
2011-03-25 20:07:25 +00:00
Julian Seward
d6740217a1 Add support for sys_ptrace. Fixes #269079.
(Ulrich Weigand, uweigand@de.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11664
2011-03-24 11:34:12 +00:00
Bart Van Assche
a170de4e78 Linux/ppc: Added support for the ppoll() system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11655
2011-03-18 17:47:38 +00:00
Bart Van Assche
47fa81b4bf Process PDB files with a path that contains spaces properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11617
2011-03-10 12:49:50 +00:00
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
62134f346f Back out r11568 (Add a new constructor for empty XArrays,
VG_(newSizedXA)) since r11571 removes the only use of the
functionality that r11568 introduces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11573
2011-02-27 23:53:32 +00:00
Julian Seward
0c2371837b Add a new constructor for empty XArrays, VG_(newSizedXA). This is
identical to VG_(newXA) but allows passing in a size hint.  In the
case where the likely final size of the XArray is known at creation
time, this allows avoiding the repeated (implicit) resizing and
copying of the array as elements are added, which can save a vast
amount of dynamic memory allocation turnover.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11568
2011-02-23 13:22:24 +00:00
Julian Seward
0e228dac5d Fix a scalability problem observed whilst running Helgrind on a large
workload: when scanning a freelist of a given size for a big-enough
block (to allocate), don't scan all the way around the list.  Instead
give up after 100 blocks and try the freelist above.  The pathological
case (as observed) is that the freelist contains tens of thousands of
blocks, but all are too small for the current request, hence they are
all visited pointlessly.  If the new heuristic is used, the freelist
start point is moved along by one block, so that future searches
eventually inspect the entire freelist, just very slowly.

Also, some improvements to stats gathering, and rename of some
existing stats fields in struct Arena.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11567
2011-02-23 13:18:56 +00:00
Julian Seward
46bbd35ea3 Make ld.so:index redir mandatory for glibc-2.12 and later, on x86-linux.
Also, improve the failure message a bit, so as to tell people what package
they need to install, in at least some cases.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11538
2011-02-11 16:47:03 +00:00
Bart Van Assche
b3f1163f39 Removed an unused variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11537
2011-02-10 21:09:25 +00:00
Julian Seward
afa6fa71cb Handle Dwarf3 types created by GNAT. Fixes #255130.
(Philippe Waroquiers <philippe.waroquiers@skynet.be>)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11517
2011-02-01 23:10:14 +00:00
Julian Seward
3bb7892440 Don't produce suppression stack pseudo-traces with more than
VG_MAX_SUPP_CALLERS entries in them.  Fixes #255822.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11515
2011-01-28 00:44:52 +00:00
Julian Seward
6904ae851c In 3 error-path cases, place the closing </valgrindoutput> on the
correct stream (XML instead of plain-text).  Fixes #255888.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11514
2011-01-28 00:19:25 +00:00
Nicholas Nethercote
4f4749956f Print a stack trace as part of the "unhandled instruction bytes" warning.
Useful if the program in question catches signals, in which case the usual
"Process terminating..." stack trace isn't shown.  Requested by Jesse
Ruderman.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11504
2011-01-18 05:16:21 +00:00
Julian Seward
ebfe3fcbe9 Improve performance of smc-checks substantially, by:
(1) allowing translations to chase across BB boundaries, as in the
    non-smc-check case

(2) on 64-bit targets, do the checksumming with 64-bit loads
    instead of 32-bit ones.

(valgrind-side change, to match vex r2070)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11495
2011-01-10 15:09:23 +00:00
Julian Seward
1852adcac0 Memcheck, None: update avg translation size to be more realistic.
Massif: specify avg translation size at all, so as to avoid excessive
retranslations caused by the fact that the default value is far below
reality for Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11494
2011-01-10 15:01:03 +00:00
Julian Seward
30dcecc9c9 Un-break the trunk build on OSX (broken by r11483 on 6 Dec '10).
Fixes #261654.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11489
2011-01-04 14:18:35 +00:00
Nicholas Nethercote
c318a53a2a When a shmat() size is passed to the tool, round it up to a page size. This
is how mmap() sizes are treated.  It fixes an assertion failure in Massif
with --pages-as-heap=yes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11485
2010-12-08 02:51:43 +00:00
Julian Seward
906915e79b New command line option: --trace-children-skip-by-arg, which allows
chase/nochase decisions for child processes to be made on the basis
of their argv[] entries rather than on the name of their executables.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11483
2010-12-06 11:40:04 +00:00
Julian Seward
401f70d784 Minor improvements to PDB reading:
* better progress messages, to make it clear that reading of a
  PDB is finished, and how much stuff was read from it

* don't mmap PDB files to read them -- instead use VG_(read).
  This is because CIFS filesystem mounting only works reliably on
  Linux when mounted with option '-o directio', and that
  disallows mmap-ing files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11482
2010-12-06 11:11:29 +00:00
Julian Seward
ce9c5ac16a Size the ARM_LINUX_FAKE_COMMPAGE correctly and add explanatory
comments.  Fixes #254556.  (Peter Maydell, peter.maydell@linaro.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11460
2010-10-20 15:43:09 +00:00
Tom Hughes
77171c6bfb Avoid a double free when a binary has a build-id and no debuglink section.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11458
2010-10-19 13:12:59 +00:00