Commit Graph

11059 Commits

Author SHA1 Message Date
Philippe Waroquiers
d02c10cede Partial bypass for 338803 Handling of dwz debug alt files or cross-CU is broken
This patch avoids dereferencing absori that are in other CUs than
the CU currently being read.
This avoids dwarf reading errors when reading inlined information.
The bypass results in inlined function being reported as
UnknownInlinedFun rather than the real correct function name.

--read-var-info=yes is still broken for unknown reasons
(probably type reading is doing some other cross-CU references ?).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14476
2014-09-06 00:13:47 +00:00
Philippe Waroquiers
9dfb7a0433 Fix 338698 race condition between gdbsrv and vgdb on startup
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14475
2014-09-05 23:57:57 +00:00
Mark Wielaard
13e43db483 Always check crc in open_debug_file for now. Bug #338791 followup.
Revision r14464 made it so that debug alt files could be found by their
build-id or their (relative) file path. Debug alt files are matched using
the given build-id, but by crc. Calculating the full CRC is costly, but
currently still needed to avoid misidentifying the main file as debug
file. Slightly more efficient would be to use fstat to check we aren't
actually opening the main file under any other name (but that only works
for local DiImages). Or we could check that the file being opened actually
has at least one .debug* section. But this change was the minimal patch
to make things work as before.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14474
2014-09-05 22:50:51 +00:00
Julian Seward
50618eb024 Improved argument checking for sys_kcmp. Derived from patch from
Christian Borntraeger.  Followup to r14451.  Pertains to #338106.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14473
2014-09-05 21:11:18 +00:00
Julian Seward
07067e0f61 evh__new_mem_heap: get rid of pointless conditional. Spotted by
Coverity and Florian Krohm.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14472
2014-09-05 20:29:10 +00:00
Julian Seward
26f0bb05e7 Be more careful to separate build flags for the preload shared objects
as opposed to the valgrind code proper.  In particular, make sure that
-mpreferred-stack-boundary=2 does not get used for the preload shared
objects, since that can cause the stack to become misaligned and leads
to segfaults.  Modified version of a patch from Matthias Schwarzott
(zzam@gentoo.org).  Fixes #324050.

Also, fix the configure check in configure.ac for
-mpreferred-stack-boundary=2 so that it checks whether this is
allowable for 32-bit code generation even on 64-bit (x86) hosts.  This
check was wrong before now and led to 32-bit builds on 64-bit hosts
generating poorer code for speed critical helper functions (eg
helperc_LOADV32le) than on 32-bit builds on 32-bit hosts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14471
2014-09-05 20:00:22 +00:00
Florian Krohm
fc33936e0a Fix function prototype as pointed out by clang.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14470
2014-09-05 19:23:20 +00:00
Julian Seward
ff3581f0d2 maybe_tweak_LLc: generalise this so that it can mash more or less any
cache size and associativity pair into something the simulator can
actually handle, by increasing the associativity whilst reducing the
number of sets, so that the number of sets becomes a power of two.
Fixes #333501.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14469
2014-09-05 19:05:20 +00:00
Florian Krohm
cd34e32cb3 The purpose of the test is to see whether the exported header files
compile OK with gcc -ansi.  Therefore, add drd.h


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14468
2014-09-05 18:36:26 +00:00
Florian Krohm
ed872a7014 Fix most clang warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14467
2014-09-05 18:30:05 +00:00
Carl Love
2fabdec65e The update fixes a format issue in the PPC test
none/tests/ppc32/jm-insns.c and none/tests/ppc64/jm-insns.c.
The BE and LE output expect files are updated as well.

There is no Bugzilla related to this update.  The issue
was found and the initial patch and BE output update 
was done by Florian Krohm <florian@eich-krohm.de>.
Carl Love <cel@us.ibm.com> added the LE output update.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14466
2014-09-05 18:05:24 +00:00
Florian Krohm
53181b0933 Move the endianess test for ppc64 to the correct place.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14465
2014-09-05 14:49:17 +00:00
Mark Wielaard
9e2c635a1b Bug 338791 Handle debug alt dwz files that are relative to the debug file.
readdwarf3 would only look for alt dwz files using the build-id.
But alt files can be installed relative to the debug (or main) file.
Fix find_debug_file to allow searching of relative files even if
we don't want an ET_REL (rel_ok) file, and pass the build-id to
open_debug_file so it can be checked. Add the debug file path to
_DebugInfoFSM and set it in find_debug_file once opened. Pass the
dbgname or filename as relative file to resolve an altfile in
read_elf_debug_info when we ahava an debugaltlink_escn.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14464
2014-09-05 14:25:17 +00:00
Florian Krohm
898b5a08a4 Make sure valgrind builds with clang 3.5.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14463
2014-09-05 14:08:51 +00:00
Julian Seward
72e0215b85 Remove unneeded variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14462
2014-09-05 07:49:54 +00:00
Christian Borntraeger
4952a40890 add more system call numbers for s390. While we are at it
also wire up the common linux kcmp system call.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14461
2014-09-04 19:57:17 +00:00
Florian Krohm
02e0bd5aa0 Revert an accidentally checked in change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14460
2014-09-04 18:37:56 +00:00
Florian Krohm
b0353a1486 Add a few more tasks to consider.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14459
2014-09-04 18:37:02 +00:00
Julian Seward
f08f28ed4a arm64: enable test cases for str bN, [reg, reg etc] and str hN, [reg,
reg etc].  Pertaining to #337762, vex r2943.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14458
2014-09-04 11:45:26 +00:00
Julian Seward
ff66667024 Fix off-by-one error in size of coredumps. Patch from Ivo Raisr
(ivosh@ivosh.net).  Fixes #338300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14457
2014-09-04 11:28:11 +00:00
Julian Seward
f226136959 arm64-linux: enable sys_mlock, sys_mlockall. Fixes #337766.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14456
2014-09-04 11:22:31 +00:00
Julian Seward
775ae0473b Patch adding support for V4L2/media ioctls. Patch from Hans Verkuil
(hverkuil@xs4all.nl).  Fixes #338023.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14455
2014-09-04 11:08:45 +00:00
Julian Seward
29797aa4c0 Add Xen 4.4 evtchn ioctl wrappers. Patch from Antony Saba
(antony.saba@fireeye.com).  Second of two patches from #337740.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14454
2014-09-04 11:02:24 +00:00
Julian Seward
a4830754d0 Add support for Xen hypercalls used by libvmi. Patch from Antony Saba
(antony.saba@fireeye.com).  First of two patches from #337740.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14453
2014-09-04 10:59:50 +00:00
Julian Seward
8f6cc91ad4 Add support for ppc32 syscalls used by uClibc. Patch from Kristof
Provost (kde-bugzilla@sigsegv.be).  Fixes #330594.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14452
2014-09-04 10:51:49 +00:00
Julian Seward
8f579dba61 Add support for sys_kcmp. Patch from Chris Jones
(cjones.bugs@gmail.com).  Fixes #338106.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14451
2014-09-04 10:17:08 +00:00
Julian Seward
7710bd5318 Remove accidentally committed bit of text.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14450
2014-09-04 10:15:52 +00:00
Petar Jovanovic
11e6f57b70 mips64: add tests for Cavium BBIT0 and BBIT1
Follow up to VEX r2942 in which support for Cavium BBIT0/1 instructions
has been added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14449
2014-09-04 01:07:08 +00:00
Julian Seward
39b8117fc8 Document the new --kernel-variant options committed in r14440.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14448
2014-09-03 22:21:25 +00:00
Julian Seward
3e94809f28 Slightly change the help text for some options that involve
user-supplied enumeration values.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14447
2014-09-03 21:58:54 +00:00
Mark Wielaard
7b304c74b2 readdwarf3.c: Improve error message on bad DW_FORM_GNU_[ref|strp]_alt usage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14444
2014-09-03 18:35:28 +00:00
Mark Wielaard
f7a5dbd2fd nightly/bin/nightly: Handle libc.so being in /lib or /lib64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14443
2014-09-03 17:06:05 +00:00
Florian Krohm
e65638e8f1 Add std_thread2.supp to the tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14442
2014-09-03 16:59:43 +00:00
Florian Krohm
a2ecdcb67c Add a redirection for the 'index' function.
Fixes BZ #327943


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14441
2014-09-03 16:01:10 +00:00
Julian Seward
7e3f04874a Improvements for Android:
* All Linux targets: add minimal ioctl support for the ION_IOC family

* Android targets: change proprietary-ioctl support for GPUs from
  being a build-time #define kludge to being controlled by --kernel-variant,
  as it should be.  Update documentation accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14440
2014-09-03 15:19:25 +00:00
Julian Seward
f5b14667aa Update after more triaging.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14439
2014-09-03 07:25:06 +00:00
Philippe Waroquiers
3b829c3acc gcc on arm64 -Og produces a (false positive) warning that
stackPos might be used uninitialised.

Silence gcc by assigning a value to stackPos.
This value must be overriden if a stack description is found.
The fact that the value is overriden is asserted.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14438
2014-09-02 22:20:14 +00:00
Philippe Waroquiers
92d5d59659 fix a typo in NEWS
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14437
2014-09-02 20:59:13 +00:00
Philippe Waroquiers
1aa0197f77 Update helgrind default suppression so that it matches with
both --read-inline-info=yes or =no

Some piece of code in glibc produces an error to be suppressed
with default helgrind supp file.
The stacktrace with inline info is:
==14392== Possible data race during write of size 1 at 0x5BB36A7 by thread #1
==14392== Locks held: none
==14392==    at 0x4C2B3B5: mempcpy (vg_replace_strmem.c:1354)
==14392==    by 0x40107FD: _dl_allocate_tls_init (dl-tls.c:437)
==14392==    by 0x4E3BF0F: get_cached_stack (allocatestack.c:250)
==14392==    by 0x4E3BF0F: allocate_stack (allocatestack.c:486)
==14392==    by 0x4E3BF0F: pthread_create@@GLIBC_2.2.5 (pthread_create.c:460)
==14392==    by 0x4C3039C: pthread_create_WRK (hg_intercepts.c:270)
==14392==    by 0x4C304AB: pthread_create@* (hg_intercepts.c:301)
==14392==    by 0x400926: main (tc22_exit_w_lock.c:42)

stack trace without inline info:
==5432==    at 0x4C2B3B5: mempcpy (vg_replace_strmem.c:1354)
==5432==    by 0x40107FD: _dl_allocate_tls_init (dl-tls.c:437)
==5432==    by 0x4E3BF0F: pthread_create@@GLIBC_2.2.5 (allocatestack.c:250)
==5432==    by 0x4C3039C: pthread_create_WRK (hg_intercepts.c:270)
==5432==    by 0x4C304AB: pthread_create@* (hg_intercepts.c:301)
==5432==    by 0x400926: main (tc22_exit_w_lock.c:42)

The suppression supposed to match the above is:
{
   helgrind---_dl_allocate_tls 
   Helgrind:Race
   fun:mempcpy
   fun:_dl_allocate_tls_init
   fun:pthread_create@@GLIBC_2.2*
   fun:pthread_create_WRK
   fun:pthread_create@*
}

This only matches the 2nd stack trace, does not match the one
with inline info.

2 solutions:
* only match the last top 2 fun, i.e. a suppression such as:
{
   helgrind---_dl_allocate_tls 
   Helgrind:Race
   fun:mempcpy
   fun:_dl_allocate_tls_init
}

Or alternatively use ...
{
   helgrind---_dl_allocate_tls 
   Helgrind:Race
   fun:mempcpy
   fun:_dl_allocate_tls_init
   ...
   fun:pthread_create@@GLIBC_2.2*
   fun:pthread_create_WRK
   fun:pthread_create@*
}

As helgrind suppressions are usually precise and/or use ...,
this last approach chosen



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14436
2014-09-02 20:03:34 +00:00
Philippe Waroquiers
f00a9f2c0d Fix wrong operator = (instead of ==) in assertion
Assertion had a side effect (detected by Coverity)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14435
2014-09-02 19:26:40 +00:00
Philippe Waroquiers
a3ccc76b17 Fix wrong operator (detected by Coverity)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14434
2014-09-02 18:34:25 +00:00
Florian Krohm
d417ea90c2 Fix a few incorrect format strings. Spotted by the Coverity checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14433
2014-09-02 14:21:25 +00:00
Tom Hughes
612c18619d Add support for some more tun/tap ioctls. BZ#315952.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14432
2014-09-02 12:54:29 +00:00
Florian Krohm
6cf18881c5 The 4th parameter of lzo1x_decompress_safe has lzo_uint * type
which, despite the name, is a pointer to an unsigned long.
So we should be passing arguments of matching type.
Spotted by the Coverity checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14431
2014-09-02 12:05:15 +00:00
Florian Krohm
8a8cc67ca0 Remove some unneeded checks. These were spotted by the Coverity checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14430
2014-09-02 11:58:10 +00:00
Florian Krohm
3aa58402fa Avoid memory leak.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14429
2014-09-02 11:38:09 +00:00
Julian Seward
ac8a005dd4 --> 3.10.0.BETA1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14428
2014-09-02 10:30:12 +00:00
Mark Wielaard
41e08a29eb Tweak gdbserver_tests/mcinfcallWSRU.stderrB.exp to match more gdb versions.
Some gdb versions don't show the source line:number after switching
threads in #0  0x........ in do_burn (). Filter "at line:number" out
and don't expect it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14427
2014-09-02 10:16:42 +00:00
Florian Krohm
fca8f55ba0 Add a clarifying comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14426
2014-09-02 09:49:53 +00:00
Julian Seward
6342e2ef52 Tidy this up for the 3.10.0 beta.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14425
2014-09-02 09:38:27 +00:00