Commit Graph

12246 Commits

Author SHA1 Message Date
Ivo Raisr
e059272ce0 Solaris door: Add support for REP_PROTOCOL_ENTITY_FMRI
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15819
2016-02-29 20:20:36 +00:00
Mark Wielaard
9c751d21ef Fix memcheck/tests/memalign_test expected output.
r15815 "Allow 8k and 32k page sizes" added an extra line in memalign_test.c.
This changed the line numbers in the output compared to the .exp file.
Just put everything on one (long) line to match expectations again.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15818
2016-02-28 10:37:55 +00:00
Petar Jovanovic
23ac24e19b mips: acquire exact page size using sysconf for unit_libcbase
Set exact value of VKI_PAGE_SIZE by calling sysconf(_SC_PAGESIZE).
This should set a correct value to this variable on MIPS systems with
different page sizes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15817
2016-02-27 00:38:38 +00:00
Carl Love
1df0d33a8c Power PPC test case test_isa_2_07 steps out of array bounds.
The test none/tests/ppc64/test_isa_2_07.c steps beyond the data array in a
number of places. The issue is the array is declared to be of size N. The for
loop is: for (i=0; i<N; i=i+2). In the body of the loop the array elements
A[i] and A[i+1] are accessed. On the last iteration i=N-1 and the second array
access becomes A[N-1+1] which accesses one element past the declared array
size.

This commit fixes the array bounds by making the for loop read:  
  
   for (i=0; i<N-1; i=i+2)

The expected output files 

none/tests/ppc64/jm_int_isa_2_07.stdout.exp 
none/tests/ppc64/jm_vec_isa_2_07.stdout.exp

are updated with the new expected results.

Valgrind Bugzilla 359829


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15816
2016-02-26 17:38:47 +00:00
Petar Jovanovic
e7e2cc219f Allow 8k and 32k page sizes
Allow 8k and 32k page sizes in memalign and other memory related tests.
This fixes crashes in the tests on systems with 8k or 32k pagesize.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15815
2016-02-26 16:05:29 +00:00
Petar Jovanovic
bb54e66345 mips: update README.mips
Remove information on now obsolete "--with-pagesize" option.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15814
2016-02-26 15:39:49 +00:00
Petar Jovanovic
d7a9a37a07 mips: determine page size at runtime
Instead of passing an option to the configure script, use runtime detection
of the page size. Remove the "--with-pagesize" parameter from the configure
script.
Also accept 8k and 32k as valid page sizes.

Patch by Maran Pakkirisamy

It fixes BZ#342356.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15813
2016-02-26 15:30:53 +00:00
Mark Wielaard
8a8b65d1f2 Bug 359733 amd64 implement ld.so strchr/index override like x86
The suppression and redirection for ld.so strchr/index isn't needed for
x86. When testing a newer glibc or calling the ld.so through an alternative
path neither the suppression (doesn't match path/name) nor the redirection
(triggers too late) works. Since there is already an hardwire override for
strlen in amd64 ld.so anyway it makes sense to also hardware index (it is
always called when ld.so loads the preload images).

This was also explained in the easy hacks Fosdem session.
See https://bugs.kde.org/show_bug.cgi?id=359733 for a pointer.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15812
2016-02-24 11:12:01 +00:00
Ivo Raisr
6d7ee1151c Fix expected output of coredump generating test cases
after SVN r15810.

Now that we have AT_ENTRY in the client auxv, mdb does not
print binary name before function designation.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15811
2016-02-24 03:20:17 +00:00
Ivo Raisr
782d01dd78 Enable remote debugging for position independent executables
on Solaris. With gcc 5.3, PIEs can be produced on Solaris 12.

gdb on Solaris requires AT_ENTRY to correctly work with those.
See very long comment before function svr4_exec_displacement().
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15810
2016-02-23 21:48:13 +00:00
Mark Wielaard
f7cce36efe Bug 359724 getsockname might crash - deref_UInt should call safe_to_deref
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15809
2016-02-23 21:27:19 +00:00
Philippe Waroquiers
1d3a107f03 rollback revision 15807, find segment is to be called anyway
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15808
2016-02-23 21:12:38 +00:00
Philippe Waroquiers
93926f75c6 No need to call VG_(am_find_nsegment) if the stack is found in the stack cache.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15807
2016-02-23 21:09:59 +00:00
Mark Wielaard
45eb3f82ab Add bug 359703 s390: wire up separate socketcalls system calls to NEWS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15806
2016-02-23 20:13:28 +00:00
Petar Jovanovic
6cf07e70a5 mips32: minor modification to MoveIns test
While no issues have been reported with this test example, it was
misusing early-clobber constraints and missing some real constraints
on the other side. Fixing it now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15805
2016-02-23 17:39:04 +00:00
Petar Jovanovic
fa6ff6faa8 Add big_debuginfo_symbol to svn ignore list
Update the svn ignore list in memcheck/tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15804
2016-02-23 16:04:35 +00:00
Petar Jovanovic
b84bfd4325 mips32: add two missing exp files in EXTRA_DIST
MoveIns.stdout.exp-mips32r2-BE and MoveIns.stdout.exp-mips32r2-LE have not
been included in EXTRA_DIST. Adding it now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15803
2016-02-23 15:41:38 +00:00
Mark Wielaard
3c4de2eb09 Bug 359703 s390: wire up separate socketcalls system calls
The linux 4.3 s390 kernel has separate system calls that were originally
hidden behind the socketcall multiplexer system call. Newer glibc versions
will use these direct system calls instead of socketcall when available.
Causing several regtest failures.

This fix simply wires up the split out system calls directly to the
existing syswrap handlers for s390.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15802
2016-02-23 15:19:49 +00:00
Petar Jovanovic
da8925d486 mips32: add tests for mfhc1 and mthc1 instructions
Add tests for mfhc1 and mthc1 instructions and (two) new exp files.
Also, minor formatting changes throughout the test file.

This is related to VEX change r3211.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15801
2016-02-22 16:29:40 +00:00
Philippe Waroquiers
4649a16580 Fix typo in Makefile.am : remove the second _
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15800
2016-02-18 21:41:01 +00:00
Philippe Waroquiers
76002f0b47 Add a test for bug 359133 Assertion 'eltSzB <= ddpa->poolSzB' failed
Test case provided by David Hallas



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15799
2016-02-18 21:32:46 +00:00
Ivo Raisr
68dd2dd0b5 Fix compiler warning about using uninitialized variable 'arr'.
Reported by gcc 5.3. The test outcome remains unchanged.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15798
2016-02-18 18:10:05 +00:00
Ivo Raisr
9c83cafb93 Fix some compiler errors about accessing static variables
from non-static inline functions reported by gcc 5.3:
warning: "locf" is static but declared in inline function "fun_f" which is not static

While at it, silence also compiler warning about uninitialized
variable "result" when calling fun_a().

n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15797
2016-02-18 17:15:45 +00:00
Carl Love
1ede267740 Power PPC 128bit modulo and carry instruction fix
VEX commit 3209 fixed: an issue with caculating the carry to the next 32-bit
chunk for the Power PPC 128-bit add and subract instructions: vaddcuq, vadduqm,
vsubcuq, vsubuqm, vaddecuq, vaddeuqm, vsubecuq, vsubeuqm

The corresponding test case didn't catch the issue.  The valgrind commit
15790 adds data values to the test that verify the issue is fixed.

This commit is to update the NEWS file.

Valgrind Bugzilla 359472 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15796
2016-02-18 16:31:55 +00:00
Mark Wielaard
54794decc8 Bug 359201 followup. futex skips argument 5 if op is FUTEX_WAIT_BITSET.
The original fix in svn r15793 read argument 6 separately by using PRA6
unconditionally. This is wrong. We need to first check whether a
track_pre_reg_read callback is registered (only memcheck does).
The PRE_REG_READX macro already had this check. Just add the same
before calling PRA6. Thanks to Tom Hughes for noticing. Without this
helgrind/tests/cond_timedwait_test and drd/tests/pth_inconsistent_cond_wait
regtests would fail.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15795
2016-02-18 11:14:47 +00:00
Philippe Waroquiers
be2da24d6c Fix incorrect (or infinite loop) unwind on RHEL7 amd64 64 bits.
Same kind of problems as explained and fixed in revision 15720:
In some cases, unwinding always retrieves the same pc/sp/bp.

Fix for 64 bits is similar: stop unwinding if the previous sp is >= new sp



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15794
2016-02-17 22:41:14 +00:00
Mark Wielaard
ccd541e916 Bug 359201 futex syscall skips argument 5 if op is FUTEX_WAIT_BITSET
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15793
2016-02-17 20:53:34 +00:00
Florian Krohm
a696c9e44a s390: Fix BZ #359289, adding support for popcnt insn.
Companion patch is VEX r3210.
Patch by Andreas Arnez (arnez@linux.vnet.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15792
2016-02-17 20:00:59 +00:00
Ivo Raisr
f71b442444 Solaris syscall: commands A_GETSTAT and A_SETSTAT
for auditon(2) subcode of the auditsys() syscall
were removed in Solaris 12.
However they stay for Solaris 11 and illumos.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15791
2016-02-17 18:11:32 +00:00
Carl Love
0e62935bd4 Power PPC 128bit modulo and carry instruction fix
VEX commit 3209 fixed: an issue with caculating the carry to the next 32-bit
chunk for the Power PPC 128-bit add and subract instructions: vaddcuq, vadduqm,
vsubcuq, vsubuqm, vaddecuq, vaddeuqm, vsubecuq, vsubeuqm

The corresponding test case didn't catch the issue.  This commit adds data
values to the test that verify the issue is fixed.

Valgrind Bugzilla 359472 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15790
2016-02-16 21:23:52 +00:00
Florian Krohm
686abc2134 s390: Recognise machine model z13s (2965).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15789
2016-02-16 21:15:32 +00:00
Philippe Waroquiers
e2d594ccbc Speed up vgdb in standalone mode by using noack mode
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15788
2016-02-15 22:53:45 +00:00
Philippe Waroquiers
f6f39d4dbe Fix Bug 359133 - m_deduppoolalloc.c:258 (vgPlain_allocEltDedupPA): Assertion 'eltSzB <= ddpa->poolSzB' failed.
When the elt to allocate is bigger than the pool size, allocate
a specific pool only for this element.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15787
2016-02-14 22:14:19 +00:00
Ivo Raisr
2428a44b84 Fix scalar test case for llseek on x86/Solaris.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15786
2016-02-12 13:57:50 +00:00
Ivo Raisr
970c6d26d2 New gcc versions (4.9, 5.3) provided by Solaris enable
largefile support by default. This gets in the way what
Valgrind core expects (vki, various m_libc modules).
Therefore disable largefile support if it is enabled.
Anyway, support for 32-bit applications is going away in Solaris 12.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15785
2016-02-12 13:43:59 +00:00
Ivo Raisr
f6c211aaf8 Exclude 'threading model' information from Solaris coredump_many_threads test as well
See previous SVN r15783 for details.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15784
2016-02-08 08:26:17 +00:00
Ivo Raisr
2811d9dff6 Exclude 'threading model' information from Solaris coredump tests
Solaris 12 transitioned to public libproc and mdb now prints
'raw lwps' instead of 'native threads' for the threading model.
This information is irrelevant for coredump generation and analysis;
therefore leave it out.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15783
2016-02-07 23:59:41 +00:00
Ivo Raisr
24e1e9f493 Solaris syscall: Add support for getrandom(143).
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15782
2016-02-05 22:57:42 +00:00
Mark Wielaard
11e3a4824d Explicitly test command -v host output before trying host command.
We have to explicitly test command -v host worked otherwise on systems
that do not have 'host' installed will return error code 127 and stop
testing. This is because vg_regtest uses '/bin/sh -c' to execute the
prereq command. Found by Petar Jovanovic.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15781
2016-02-04 22:38:06 +00:00
Philippe Waroquiers
861333b084 Some more fixes for Bug 348345 - Assertion fails for negative lineno
* Complain instead of asserting when negative line nr in inline info
* use a macro to factorise the complain once logic about lineno limits



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15780
2016-02-03 22:12:56 +00:00
Tom Hughes
5465229553 Add tests for FCOM/FCOMP instructions. BZ#212352.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15779
2016-02-03 10:15:56 +00:00
Petar Jovanovic
525050c47a mips64: use getdents() if getdents64() is not available
The MIPS64 getdents64() system call is only present in 3.10+ kernels.
If the getdents64() system call is not available fall back to using
getdents() and modify the result to be compatible with getdents64().
This matters only when --track-fds=yes is set.

This change fixes none/tests/fdleak* failures on MIPS64 platforms with
kernel versions older than 3.10.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15778
2016-01-29 17:47:43 +00:00
Julian Seward
696487740c Update list of bugs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15777
2016-01-28 12:20:42 +00:00
Philippe Waroquiers
f2e1687cb8 Fix misplaced closing parenthesis in various VG_(....) calls
At many places, we have:
   VG_(fun(a,b,c))
instead of
   VG_(fun)(a,b,c)
So, fix these cases, found using:
grep -n -i -e 'VG_([a-z][a-z0-9_]*[^a-z0-9_)]' *.c */*.c */*/*.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15776
2016-01-27 22:35:14 +00:00
Ivo Raisr
f18a40c2c8 Fix expected output of test memcheck/tests/leak_cpp_interior on Solaris 12.
C++ allocator from Solaris Studio allocates for std::string
57 bytes instead of former 40 bytes on 64-bit, and 45 bytes instead of 28 on 32-bit.
Confirmed with truss and --trace-alloc=yes.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15775
2016-01-26 10:34:16 +00:00
Ivo Raisr
8952c86a9c Fix compilation error on Solaris.
Include <sys/segments.h> only on x86/amd64 architecture.
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15774
2016-01-26 04:31:04 +00:00
Bart Van Assche
85cbffe27b configure.ac: Port to gcc 5
Apparently gcc 5 behaves as follows:
$ gcc -dumpversion
5



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15773
2016-01-25 04:27:25 +00:00
Mark Wielaard
be3614b774 Fix tinycc.c misleading indentation as pointed out by GCC6.
tinycc.c: In function ‘expr_eq’:
tinycc.c:13368:21: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
                     gv(rc);
                     ^~

tinycc.c:13366:17: note: ...this ‘else’ clause, but it is not
                 else
                 ^~~~

Two statements are indeed misleadingly indented. Fixed by unindenting them.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15772
2016-01-24 13:39:10 +00:00
Philippe Waroquiers
c80f32e662 Change tests using --fullpath-after so as to work with ccache caching compiler
ccache sometimes causes the source file absolute name to be another
full path (not $PWD).
This means that the badfree3 and varinfo5 tests can fail due to
the full path after not being match on $PWD.
So, rather ask full path after a part of the path that is stable
even when ccache decides to reuse a already compiled object from
another directory.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15771
2016-01-22 22:06:02 +00:00
Philippe Waroquiers
9c66c9607b Implement support for 'catch syscall' in gdbserver.
Note that catch syscall implies to use the soon to be released
gdb 7.11 version.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15770
2016-01-22 21:06:23 +00:00