]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
8 years agoAdd none/tests/ppc64/ppc64_helpers.h to noinst_HEADERS.
Mark Wielaard [Mon, 19 Sep 2016 22:03:34 +0000 (22:03 +0000)] 
Add none/tests/ppc64/ppc64_helpers.h to noinst_HEADERS.

Makes sure that the header file will be included in the dist tar.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15968

8 years agoAdd missing file for bug #358213 workaround.
Mark Wielaard [Mon, 19 Sep 2016 19:25:33 +0000 (19:25 +0000)] 
Add missing file for bug #358213 workaround.

svn commit r15962 missed adding bar_bad.stderr.exp-destroy-hang.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15966

8 years agoWorkaround bar_bad testcase hanging with newer glibc in helgrind/drd tests.
Mark Wielaard [Mon, 19 Sep 2016 14:16:35 +0000 (14:16 +0000)] 
Workaround bar_bad testcase hanging with newer glibc in helgrind/drd tests.

This is a workaround for bug #358213 helgrind/drd pthread_barrier tests
hangs with new glibc pthread barrier implementation. This makes sure that
the tests don't hang anymore. It does this by creating new threads that
sleep and kill the other threads after some time. But this introduces
some non-determinism that might cause the tests to occassionally fail
(both against old and new glibc implementations).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15962

8 years agoTestcases for fma4 instructions. Bug #369000.
Mark Wielaard [Mon, 19 Sep 2016 12:41:38 +0000 (12:41 +0000)] 
Testcases for fma4 instructions. Bug #369000.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15961

8 years agoFix bad gdbserver_tests heap usage tests stderr output.
Mark Wielaard [Mon, 19 Sep 2016 08:08:51 +0000 (08:08 +0000)] 
Fix bad gdbserver_tests heap usage tests stderr output.

When doing inferior function calls from gdb (in mcmain_pic) there might
be extra heap usage from gdb that we aren't interested in tracking.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15960

8 years agoUpdate bug lists.
Julian Seward [Fri, 16 Sep 2016 13:38:02 +0000 (13:38 +0000)] 
Update bug lists.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15959

8 years agoUpdate bug list.
Julian Seward [Thu, 15 Sep 2016 10:56:00 +0000 (10:56 +0000)] 
Update bug list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15958

8 years agoupdated the NEWS file for bugzillas that have been closed:
Carl Love [Wed, 14 Sep 2016 17:16:52 +0000 (17:16 +0000)] 
updated the NEWS file for bugzillas that have been closed:

   Bugzilla 368412 commit15952
   Bugzilla 368416 commit15956

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15957

8 years agoAdd tc06_two_races_xml.exp output for ppc64
Carl Love [Wed, 14 Sep 2016 16:43:27 +0000 (16:43 +0000)] 
Add tc06_two_races_xml.exp output for ppc64

Update xml filter to suppress pthread_create_WRK frame.  Update the filter_xml
filter to suppress the frame containing the pthread_create_WRK function.  This
allows the tc06_two_races_xml test to complete reliably on power.

This change also adds the ability to suppress the printf that generates a
"pthread_create_WRK...pthread_create" entry to replace the suppressed frame.

This is conceptually a follow-up from r13983, which suppresses the
pthread_create_WRK entry from non-xml outputs.

Patch submitted by Will Schmidt  <will_schmidt@vnet.ibm.com>

Bugzilla 368416

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15956

8 years agoAdapt massif mmapunmap test to handle ppc64 backtrace
Carl Love [Wed, 14 Sep 2016 15:50:48 +0000 (15:50 +0000)] 
Adapt massif mmapunmap test to handle ppc64 backtrace

The reported backtrace on ppc64 platform reports "generic_start_main.isra.0"
in the backtrace, where other platforms typically see "main".  Adjust the
vgtest file to handle this variation.  This is similar to existing changes
as seen in deep-D.post.exp

FORGOT to add the file massif/tests/mmapunmap.post.exp-ppc64 before doing
commit 15950.

Bugzilla 368461

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15955

8 years agoUpdate.
Julian Seward [Wed, 14 Sep 2016 13:15:28 +0000 (13:15 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15954

8 years agoBug #359503 continued. adjtimex syscall missing on arm64.
Mark Wielaard [Wed, 14 Sep 2016 11:47:26 +0000 (11:47 +0000)] 
Bug #359503 continued. adjtimex syscall missing on arm64.

Enable adjtimex syscall on arm64 and fix bug if argument is a bad pointer.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15953

8 years agoCorrect an Altivec configure think-o.
Mark Wielaard [Tue, 13 Sep 2016 19:18:36 +0000 (19:18 +0000)] 
Correct an Altivec configure think-o.

An earlier change introduced a think-o in the altivec capability
check, allowing a false positive if the compiler supported altivec
but the hardware did not.

Resolves bug #368412 - False positive result for altivec capability check
Patch by Will Schmidt <will_schmidt@vnet.ibm.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15952

8 years agoUpdate libiberty demangler.
Mark Wielaard [Tue, 13 Sep 2016 19:06:23 +0000 (19:06 +0000)] 
Update libiberty demangler.

Update the libiberty demangler using the auxprogs/update-demangler
script. There were various extensions and bug fixes since our last
import. Add new D language demangler file d-demangle.c and update
the vg_libciface.h header with some new constructs used (strtol,
xmalloc_failed, xmemdup, XDELETEVEC, XDUPVEC).

Resolves bug #359181 - Buffer Overflow during Demangling.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15951

8 years agoAdapt massif mmapunmap test to handle ppc64 backtrace
Carl Love [Tue, 13 Sep 2016 15:54:33 +0000 (15:54 +0000)] 
Adapt massif mmapunmap test to handle ppc64 backtrace

The reported backtrace on ppc64 platform reports "generic_start_main.isra.0"
in the backtrace, where other platforms typically see "main".  Adjust the
vgtest file to handle this variation.  This is similar to existing changes
as seen in deep-D.post.exp

Bugzilla 368461

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15950

8 years agoSupport clang compiler shipped with Apple’s Xcode 8. bz#366138.
Rhys Kidd [Sun, 11 Sep 2016 13:54:04 +0000 (13:54 +0000)] 
Support clang compiler shipped with Apple’s Xcode 8. bz#366138.

This applies to both OS X 10.11 and macOS 10.12.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15949

8 years agoImprove configure output error message, when compiler version not supported. n-i-bz.
Rhys Kidd [Sun, 11 Sep 2016 13:42:50 +0000 (13:42 +0000)] 
Improve configure output error message, when compiler version not supported. n-i-bz.

Based on a patch by Jeremy Hu <jeremyhu@uclink4.berkeley.edu>. Refer bz#366138.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15948

8 years agoMAXSYSCALL for OS X 10.11.6 (xnu 3248.60.10) was indeed 500. n-i-bz.
Rhys Kidd [Sun, 11 Sep 2016 05:28:59 +0000 (05:28 +0000)] 
MAXSYSCALL for OS X 10.11.6 (xnu 3248.60.10) was indeed 500. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15947

8 years agoFollow up to r15905, properly guard memcheck/tests/amd64/shr_edx on clang. n-i-bz.
Rhys Kidd [Sun, 11 Sep 2016 04:33:20 +0000 (04:33 +0000)] 
Follow up to r15905, properly guard memcheck/tests/amd64/shr_edx on clang. n-i-bz.

“error in backend: 32-bit absolute addressing is not supported in 64-bit mode”

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15946

8 years agoFix 199468 - Suppressions: stack size limited to 25 while --num-callers allows more...
Philippe Waroquiers [Wed, 7 Sep 2016 20:12:30 +0000 (20:12 +0000)] 
Fix 199468 - Suppressions: stack size limited to 25 while --num-callers allows more frames

Nr of callers in a suppression entry had a smaller limit than the max
for --num-callers.
This means it was not possible to precisely suppress an error with a big
stack trace.
Also, --gen-suppressions was not providing the full stack trace of
the error in the generated suppressions.

Now, a suppression entry can have the same nr of callers as a backtrace.
Generated suppressions are generated with up to --num-callers callers.

This change has neglectible impact :
* memory: stack array of 500*2 words is declared, instead of 24*2 words
  This array is declared on the interim stack (startup stack), which is
  largely big enough.
* cpu : neglectible more cpu needed to read suppression entries
        (to initialise the bigger stack array when reading a supp entry),
Apart of the above, no impact on performance (unless of course bigger
supp entries are really used).

Note that this does not impact the behaviour for existing suppression files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15945

8 years agoUse -std=c++0x for big_debuginfo_symbol to appease older compilers.
Mark Wielaard [Mon, 5 Sep 2016 13:13:12 +0000 (13:13 +0000)] 
Use -std=c++0x for big_debuginfo_symbol to appease older compilers.

gcc 4.4 doesn't know -std=c++11, but does recognize -std=c++0x.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15944

8 years agoConnect up the v8 memory insn tests to the build system, and arrange
Julian Seward [Thu, 1 Sep 2016 15:19:07 +0000 (15:19 +0000)] 
Connect up the v8 memory insn tests to the build system, and arrange
for both ARM and Thumb encodings to be tested.

Modify the existing v8 crypto tests so that both ARM and Thumb encodings
are tested.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15943

8 years agoEnable test cases for arm32 v8 insns: LDAEX{,B,H,D}, STLEX{,B,H,D}
Julian Seward [Thu, 1 Sep 2016 13:10:55 +0000 (13:10 +0000)] 
Enable test cases for arm32 v8 insns: LDAEX{,B,H,D}, STLEX{,B,H,D}
(load-acquire exclusive, store-release exclusive)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15942

8 years agoAdd test cases for ARMv8 insns: LDA, LDAB, LDAH, STL, STLB, STLH.
Julian Seward [Sun, 28 Aug 2016 16:17:12 +0000 (16:17 +0000)] 
Add test cases for ARMv8 insns: LDA, LDAB, LDAH, STL, STLB, STLH.
Not connected to the build system yet.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15941

8 years agoAllow building vbit_test when srdir != builddir.
Mark Wielaard [Fri, 26 Aug 2016 13:10:14 +0000 (13:10 +0000)] 
Allow building vbit_test when srdir != builddir.

Link against libvex-<arch>-<os>.a in top_builddir.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15940

8 years agoFollow up to SVN commit r15936.
Ivo Raisr [Wed, 17 Aug 2016 18:05:13 +0000 (18:05 +0000)] 
Follow up to SVN commit r15936.
Fix the sloppy check I introduced.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15939

8 years agoPower PC test suite for ISA 3.0, part 5 of 5
Carl Love [Mon, 15 Aug 2016 21:54:04 +0000 (21:54 +0000)] 
Power PC test suite for ISA 3.0, part 5 of 5

The test suite support for the Power PC ISA 3.0 instructions added in
VEX commit 3244 is added in this commit.

bugzilla 364948

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15938

8 years agoFollow up to r15936.
Ivo Raisr [Mon, 15 Aug 2016 02:31:27 +0000 (02:31 +0000)] 
Follow up to r15936.
Kernel allocates another page after fork and we have to
keep aspacemgr's point of view consistent.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15937

8 years agoFollow recent Solaris development with respect to
Ivo Raisr [Fri, 12 Aug 2016 22:28:50 +0000 (22:28 +0000)] 
Follow recent Solaris development with respect to
SUNWDTRACE program header. Newer Solaris no longer utilizes
this program header as a scratchspace for DTrace fasttrap
provider, before libc is loaded.
For the time being, it serves as a space for initial thread
pointer.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15936

8 years agoConnect the v8crypto test to the build system, at least somewhat, so
Julian Seward [Wed, 10 Aug 2016 22:22:20 +0000 (22:22 +0000)] 
Connect the v8crypto test to the build system, at least somewhat, so
as to make the post-regtest-tests happy.  Still needs configure.ac
checking for "-mfpu=crypto-neon-fp-armv8" gcc flag support.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15935

8 years agomips32: add support for FPXX mode
Petar Jovanovic [Wed, 10 Aug 2016 14:38:10 +0000 (14:38 +0000)] 
mips32: add support for FPXX mode

With this patch, MIPS32 Valgrind compiled with -mfpxx can handle all types
(regarding FP_ABI flag) of MIPS32 ELFs.

- Functions arch_elf_pt_proc() and arch_check_elf() are added to elf reader
  according to linux/fs/binfmt_elf.c from Linux 4.1;
- Processing .MIPS.abiflags section and initializing appropriate FPU mode
  for MIPS32 are added;
- Emulation of prctl(GET/SET_FP_MODE) sys-calls are implemented for MIPS32.

Patch by Aleksandar Rikalo <Aleksandar.Rikalo@imgtec.com>

Related VEX change: r3243.

This implements BZ#366079.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15934

9 years agonone/tests/arm/v8crypto:
Julian Seward [Sun, 7 Aug 2016 23:36:10 +0000 (23:36 +0000)] 
none/tests/arm/v8crypto:
* enable all tests in this file
* add an expected output (stderr.exp) file

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15933

9 years agoFix uses of CPSR in these tests, so that (1) the relevant fields are
Julian Seward [Sat, 6 Aug 2016 12:33:59 +0000 (12:33 +0000)] 
Fix uses of CPSR in these tests, so that (1) the relevant fields are
initialised properly before the test, and (2) after the test, we don't
print implementation-defined parts of the resulting CPSR.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15932

9 years agodo_vldm_vstm_check: don't use caller saved FP ('s') registers to hold
Julian Seward [Sat, 6 Aug 2016 12:32:37 +0000 (12:32 +0000)] 
do_vldm_vstm_check: don't use caller saved FP ('s') registers to hold
data that we expect to stay alive over calls to printf.  Fixes erratic
failures of this test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15931

9 years agoFix invalid code caught by Ubsan, in which we compute the address
Julian Seward [Sat, 6 Aug 2016 07:15:30 +0000 (07:15 +0000)] 
Fix invalid code caught by Ubsan, in which we compute the address
of "cgs->events[-1]", even though it isn't dereferenced.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15930

9 years agoFix completely bogus array indexing introduced in r15927 -- how did this
Julian Seward [Fri, 5 Aug 2016 17:22:21 +0000 (17:22 +0000)] 
Fix completely bogus array indexing introduced in r15927 -- how did this
ever work?  Spotted by UBSAN.  Yay UBSAN!  Also update comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15929

9 years agoUpdate.
Julian Seward [Fri, 5 Aug 2016 15:15:20 +0000 (15:15 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15928

9 years agoReimplement MC_(final_tidy) much more efficiently. This reduces its instruction
Julian Seward [Fri, 5 Aug 2016 14:59:50 +0000 (14:59 +0000)] 
Reimplement MC_(final_tidy) much more efficiently.  This reduces its instruction
count by a factor of about 4.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15927

9 years agoReimplement pszB_to_listNo using a binary search rather than a linear search.
Julian Seward [Fri, 5 Aug 2016 14:54:27 +0000 (14:54 +0000)] 
Reimplement pszB_to_listNo using a binary search rather than a linear search.
Unlikely as it seems, this saves a considerable number of instructions (2% of total)
on very heap-intensive code (perf/heap.c).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15926

9 years agoConnect up the new CRC32 tests to the build system.
Julian Seward [Thu, 4 Aug 2016 21:40:59 +0000 (21:40 +0000)] 
Connect up the new CRC32 tests to the build system.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15925

9 years agoAdd test cases for the CRC32* instruction group. Is not yet connected to the
Julian Seward [Thu, 4 Aug 2016 21:14:24 +0000 (21:14 +0000)] 
Add test cases for the CRC32* instruction group.  Is not yet connected to the
build system.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15924

9 years agoMake "ashmem" and "binder" ioctls be handled properly on 64-bit ARM Android,
Julian Seward [Thu, 4 Aug 2016 21:11:28 +0000 (21:11 +0000)] 
Make "ashmem" and "binder" ioctls be handled properly on 64-bit ARM Android,
rather than falling through to the generic handler and being mishandled.
Fixes #360574.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15923

9 years agoAdd test cases for v8 crypto instructions in 32-bit mode. Is not yet connected
Julian Seward [Wed, 3 Aug 2016 11:44:02 +0000 (11:44 +0000)] 
Add test cases for v8 crypto instructions in 32-bit mode.  Is not yet connected
to the build/test system.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15922

9 years agoAdd infrastructure for detection of 32-bit ARMv8 capable CPUs (Valgrind side).
Julian Seward [Wed, 3 Aug 2016 11:40:36 +0000 (11:40 +0000)] 
Add infrastructure for detection of 32-bit ARMv8 capable CPUs (Valgrind side).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15921

9 years agoIgnore built binary memcheck/tests/amd64/shr_edx.
Ivo Raisr [Sat, 30 Jul 2016 03:04:20 +0000 (03:04 +0000)] 
Ignore built binary memcheck/tests/amd64/shr_edx.
Follow up to r15905.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15920

9 years agoFix test memcheck/tests/descr_belowsp so as the stack
Ivo Raisr [Sat, 30 Jul 2016 03:01:52 +0000 (03:01 +0000)] 
Fix test memcheck/tests/descr_belowsp so as the stack
guard page is visible also on Solaris.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15919

9 years agoFix test memcheck/tests/descr_belowsp a bit on Solaris.
Ivo Raisr [Fri, 29 Jul 2016 20:52:21 +0000 (20:52 +0000)] 
Fix test memcheck/tests/descr_belowsp a bit on Solaris.

On Solaris, '%p' outputs just a hexadecimal number
without '0x' prefix. This is perfectly valid but not
understood by VG_(strtok_get_address_and_size)().
Therefore use universal PRIxPTR.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15918

9 years agoWhen running the valgrind tests, the jm-insns test is segfaulting when it
Carl Love [Thu, 28 Jul 2016 16:51:53 +0000 (16:51 +0000)] 
When running the valgrind tests, the jm-insns test is segfaulting when it
attempts to patch instructions as it deals with the ppc64 (BE) function
descriptor. This is actually due to the RELRO option being enabled by default
for the ppc64 (BE) platform, per an upstream binutils change.

Bugzilla 365912 reported by  Will Schmidt, Will supplied the patch to fix the
make file none/tests/ppc64/Makefile.a

Patch tested on Power 7 and Power 8.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15917

9 years agoAdd missing x86/Solaris and amd64/Solaris supported platforms.
Ivo Raisr [Wed, 27 Jul 2016 18:16:29 +0000 (18:16 +0000)] 
Add missing x86/Solaris and amd64/Solaris supported platforms.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15916

9 years agoEnable test cases for PMULL 1q,1d,1d and PMULL2 1q,2d,2d. n-i-bz.
Julian Seward [Sun, 24 Jul 2016 18:59:02 +0000 (18:59 +0000)] 
Enable test cases for PMULL 1q,1d,1d and PMULL2 1q,2d,2d.  n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15915

9 years agoUpdate.
Julian Seward [Sun, 24 Jul 2016 11:45:58 +0000 (11:45 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15914

9 years agoAdd test cases for PCMPxSTRx cases 0x62 and 0x72, and reformat the associated
Julian Seward [Sun, 24 Jul 2016 11:41:12 +0000 (11:41 +0000)] 
Add test cases for PCMPxSTRx cases 0x62 and 0x72, and reformat the associated
switch statements a bit more consistently.  Pertains to #353384 and #353727.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15913

9 years agoFix incorrect assertion re sizeof TTEntryC on arm-linux. Fixes #362935.
Julian Seward [Thu, 21 Jul 2016 12:47:51 +0000 (12:47 +0000)] 
Fix incorrect assertion re sizeof TTEntryC on arm-linux.  Fixes #362935.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15912

9 years agoUpdate.
Julian Seward [Wed, 20 Jul 2016 17:51:53 +0000 (17:51 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15911

9 years agoAdd test cases for PCMPxSTRx cases 0x70 and 0x19. Pertains to #359952.
Julian Seward [Wed, 20 Jul 2016 16:37:09 +0000 (16:37 +0000)] 
Add test cases for PCMPxSTRx cases 0x70 and 0x19.  Pertains to #359952.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15910

9 years agoUpdate w/ recent arm64 insn emulation fixes.
Julian Seward [Tue, 19 Jul 2016 07:08:56 +0000 (07:08 +0000)] 
Update w/ recent arm64 insn emulation fixes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15909

9 years agoAdd test cases for: SHA1C SHA1H SHA1M SHA1P SHA1SU0 SHA1SU1 SHA256H2 SHA256H
Julian Seward [Mon, 18 Jul 2016 06:35:13 +0000 (06:35 +0000)] 
Add test cases for: SHA1C SHA1H SHA1M SHA1P SHA1SU0 SHA1SU1 SHA256H2 SHA256H
SHA256SU0 SHA256SU1.

Increase the number of iterations from 10 to 50 for AESD AESE AESIMC AESMC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15908

9 years agoFix arm64/fp_and_simd.c compile error.
Mark Wielaard [Sat, 16 Jul 2016 21:50:45 +0000 (21:50 +0000)] 
Fix arm64/fp_and_simd.c compile error.

Older GCC don't default to GNU11 and will produce:
error: ‘for’ loop initial declarations are only allowed in C99 mode

Move int i declaration to top of main.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15907

9 years agoEnable test cases for: AESE AESD AESMC AESIMC.
Julian Seward [Fri, 15 Jul 2016 10:33:20 +0000 (10:33 +0000)] 
Enable test cases for: AESE AESD AESMC AESIMC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15906

9 years agoRegression test for n-i-bz amd64: memcheck false positive with shr %edx
Philippe Waroquiers [Tue, 12 Jul 2016 20:48:31 +0000 (20:48 +0000)] 
Regression test for n-i-bz amd64: memcheck false positive with shr %edx
Valgrind side : reproducer for the false positive memcheck
+ announce the fix (VEX side in next commit)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15905

9 years agoIgnore pselect_sigmask_null executable.
Ivo Raisr [Mon, 11 Jul 2016 21:10:47 +0000 (21:10 +0000)] 
Ignore pselect_sigmask_null executable.
Part of fix for BZ#364413.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15904

9 years agoSet executable protection on schedctl pages only when necessary.
Ivo Raisr [Mon, 11 Jul 2016 21:05:03 +0000 (21:05 +0000)] 
Set executable protection on schedctl pages only when necessary.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15903

9 years agoFix 365273 - Invalid write to stack location reported after signal handler runs
Philippe Waroquiers [Sun, 10 Jul 2016 21:17:58 +0000 (21:17 +0000)] 
Fix 365273 - Invalid write to stack location reported after signal handler runs

Analysis and patch by Earl Chew

Tested on x86/amd64/ppc64

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15902

9 years agoFinish first-pass classification of bugs reported up to 4 July 2016.
Julian Seward [Tue, 5 Jul 2016 08:41:07 +0000 (08:41 +0000)] 
Finish first-pass classification of bugs reported up to 4 July 2016.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15901

9 years agoInitial triage of a bunch of bugs from Oct 2015 to Feb 2016, roughly.
Julian Seward [Mon, 4 Jul 2016 16:57:36 +0000 (16:57 +0000)] 
Initial triage of a bunch of bugs from Oct 2015 to Feb 2016, roughly.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15900

9 years agoUpdate the bug list.
Julian Seward [Mon, 4 Jul 2016 11:17:37 +0000 (11:17 +0000)] 
Update the bug list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15899

9 years agoFix leak in m_redir.c
Philippe Waroquiers [Sat, 2 Jul 2016 18:46:23 +0000 (18:46 +0000)] 
Fix leak in m_redir.c
See below discussion for more details.

On Sat, 2016-07-02 at 14:20 +0200, Philippe Waroquiers wrote:
> I am testing a patch (provided by Julian) that solves a false positive
> memcheck found at my work.
>
> Testing this, I decided to run valgrind under valgrind (not done since
> a long time).
>
> This shows a leak in many tests, the stack trace being such as:
> ==26246== 336 bytes in 21 blocks are definitely lost in loss record 72 of 141
> ==26246==    at 0x2801C01D: vgPlain_arena_malloc (m_mallocfree.c:1855)
> ==26246==    by 0x2801D616: vgPlain_arena_strdup (m_mallocfree.c:2528)
> ==26246==    by 0x2801D616: vgPlain_strdup (m_mallocfree.c:2600)
> ==26246==    by 0x2801F5AD: vgPlain_redir_notify_new_DebugInfo (m_redir.c:619)
> ==26246==    by 0x2803B650: di_notify_ACHIEVE_ACCEPT_STATE (debuginfo.c:771)
> ==26246==    by 0x2803B650: vgPlain_di_notify_mmap (debuginfo.c:1067)
> ==26246==    by 0x2806589C: vgModuleLocal_generic_PRE_sys_mmap (syswrap-generic.c:2368)
> ==26246==    by 0x2809932A: vgSysWrap_amd64_linux_sys_mmap_before (syswrap-amd64-linux.c:637)
> ==26246==    by 0x28061E11: vgPlain_client_syscall (syswrap-main.c:1906)
> ==26246==    by 0x2805E9D2: handle_syscall (scheduler.c:1118)
> ==26246==    by 0x280604A6: vgPlain_scheduler (scheduler.c:1435)
> ==26246==    by 0x2806FF87: thread_wrapper (syswrap-linux.c:103)
> ==26246==    by 0x2806FF87: run_a_thread_NORETURN (syswrap-linux.c:156)
>
>
> The strdup call in m_redir.c:619 was introduced by r15726.
>
> However, I am not sure this is a bug that is introduced by this change,
> or if it just reveals a leak that was already there.
> The "very original" replacement logic did not do memory allocation for
> the replacement: see m_redir.c in valgrind 3.10.1 : it was just copying
> some chars from VG_(clo_soname_synonyms) to demangled_sopatt

Yes, it should do exactly the same as the other code paths. If
replaced_sopatt != NULL then it is an allocated string that has been
assigned to demangled_sopatt. I had assumed that would take care of the
life-time issues of the allocated string. But now that I read the code
it is indeed not so clear.

> Then in 3.11, the fixed size demangled_sopatt was changed to be
> a dynamically allocated buffer.
> The revision log 14664 that introduced this explains that the ownership of
> returned buffer is not easy. It tells at the end:
> "So the rule of thunb here is: if in doubt strdup the string."
>
> but now we have to see when to free what, it seems ???
>
> Any thoughts ?

So if replaced_sopatt != NULL, then demangled_sopatt contains the
allocated string, and it is then immediately copied and assigned to
spec->from_sopatt. After that it is used under check_ppcTOCs. But there
it will first be reassigned a new value through maybe_Z_demangle
(overwriting any existing string being pointed to). So for this
particular leak it seem fine to free it right after the spec[List] has
been initialized (line 642).

Cheers,

Mark

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15898

9 years agofix 364058 - clarify in manual limitations of array overruns detections
Philippe Waroquiers [Thu, 30 Jun 2016 20:28:53 +0000 (20:28 +0000)] 
fix 364058 - clarify in manual limitations of array overruns detections

Further try to clarify again with more words the way sgcheck works
and the implied limitations

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15897

9 years agoPower PC test suite for ISA 3.0, part 4
Carl Love [Wed, 29 Jun 2016 18:09:57 +0000 (18:09 +0000)] 
Power PC test suite for ISA 3.0, part 4

The test suite support for the Power PC ISA 3.0 instructions added in
VEX commit 3222 is added in this commit.

Note, this is part 4 of 5.  The NEWS file will be updated when the ISA 3.0
support is complete.

valgrind bugzilla 363858

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15896

9 years agoAdd the HW register support for missing registers in get_otrack_shadow_offset_wrk...
Carl Love [Mon, 27 Jun 2016 15:50:29 +0000 (15:50 +0000)] 
Add the HW register support for missing registers in get_otrack_shadow_offset_wrk().  The registers are: NRADDR, NRADDR_GPR2, (REDIR_STACK, TFHAR, TEXASR, TEXASRU, TFIAR, PPR, PSPB.

Bugzilla  36728

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15895

9 years agoBug 364413 followup - fix signask -> sigmask typo in EXTRA_DIST
Mark Wielaard [Tue, 21 Jun 2016 21:06:27 +0000 (21:06 +0000)] 
Bug 364413 followup - fix signask -> sigmask typo in EXTRA_DIST

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15894

9 years agoBug 364413 pselect sycallwrapper mishandles NULL sigmask.
Mark Wielaard [Tue, 21 Jun 2016 19:58:21 +0000 (19:58 +0000)] 
Bug 364413 pselect sycallwrapper mishandles NULL sigmask.

Don't check or try to copy sigmask if it is NULL. The sigmask might be
given in a struct, where the length is non-zero, but the signal set
pointer is NULL.

Testcase provided by Paul Eggert <eggert@cs.ucla.edu>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15893

9 years agoUpdated NEWS file for bugzilla 360035: missing (broken) support for wbit field
Carl Love [Mon, 13 Jun 2016 17:30:24 +0000 (17:30 +0000)] 
Updated NEWS file for bugzilla 360035: missing (broken) support for wbit field
on mtfsfi instruction (ppc64).  VEX fix committed, vex commit 3221.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15892

9 years agoFix tst->os_state.pthread - magic_delta assertion failure on OSX 10.11
Rhys Kidd [Sat, 4 Jun 2016 15:34:56 +0000 (15:34 +0000)] 
Fix tst->os_state.pthread - magic_delta assertion failure on OSX 10.11
bz#354883

Whilst I’ve seen different magic_delta values on one of my older development machines (Intel Nehalem-based), enough other users have reported success with this change.

If this causes regressions, please report your hardware details in our Bugzilla.

Regression test output on OS X 10.11

Before:

== 601 tests, 223 stderr failures, 12 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After:

== 601 tests, 223 stderr failures, 12 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15891

9 years agoPower PC Add test suite support for ISA 3.0, part 3
Carl Love [Wed, 1 Jun 2016 18:13:19 +0000 (18:13 +0000)] 
Power PC Add test suite support for ISA 3.0, part 3

The test suite support for the Power PC ISA 3.0 instructions added in
VEX commit 3220 is added in this commit.

Note, this is part 2 of 5.  The NEWS file will be updated when the ISA 3.0
support is complete.

valgrind bugzilla 362329

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15890

9 years agoBug 363680 add renameat2() support
Mark Wielaard [Tue, 31 May 2016 12:16:15 +0000 (12:16 +0000)] 
Bug 363680 add renameat2() support

Patch written by Jann Horn <jannhorn@googlemail.com>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15889

9 years agoBug 363714 ppc64 missing syscalls sync, waitid and name_to/open_by_handle_at
Mark Wielaard [Mon, 30 May 2016 20:16:04 +0000 (20:16 +0000)] 
Bug 363714 ppc64 missing syscalls sync, waitid and name_to/open_by_handle_at

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15888

9 years agoBug #363705 arm64 missing syscall name_to_handle_at and open_by_handle_at
Mark Wielaard [Mon, 30 May 2016 14:17:25 +0000 (14:17 +0000)] 
Bug #363705 arm64 missing syscall name_to_handle_at and open_by_handle_at

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15887

9 years agoUnify expected output of memcheck/tests/solaris/scalar test case
Ivo Raisr [Sun, 29 May 2016 17:28:00 +0000 (17:28 +0000)] 
Unify expected output of memcheck/tests/solaris/scalar test case
on amd64 and x86 architectures.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15886

9 years agoSolaris: Further refinement of r15882 for Solaris versions
Ivo Raisr [Sun, 29 May 2016 12:10:58 +0000 (12:10 +0000)] 
Solaris: Further refinement of r15882 for Solaris versions
which do not have <sys/sysnvl.h> header file.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15885

9 years agoSolaris: Add ioctl wrappers for DINFOUSRLD and DINFOIDENT.
Ivo Raisr [Sun, 29 May 2016 09:29:28 +0000 (09:29 +0000)] 
Solaris: Add ioctl wrappers for DINFOUSRLD and DINFOIDENT.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15884

9 years agoUnbreak non-Solaris builds after r15882.
Ivo Raisr [Sun, 29 May 2016 08:21:50 +0000 (08:21 +0000)] 
Unbreak non-Solaris builds after r15882.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15883

9 years agoSolaris: Add syscall modctl with several commands implemented.
Ivo Raisr [Sat, 28 May 2016 22:05:43 +0000 (22:05 +0000)] 
Solaris: Add syscall modctl with several commands implemented.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15882

9 years agoMinor clarification for r15880.
Ivo Raisr [Tue, 24 May 2016 22:29:24 +0000 (22:29 +0000)] 
Minor clarification for r15880.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15881

9 years agoDocument brk segment limitation, reference manual in limit reached msg.
Philippe Waroquiers [Sun, 22 May 2016 20:48:09 +0000 (20:48 +0000)] 
Document brk segment limitation, reference manual in limit reached msg.

The msg telling brk cannot be extended confuses some users
so improve the documentation and have the msg referencing the doc.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15880

9 years agoSolaris: Add wrapper for setparam subcode of the door syscall.
Ivo Raisr [Mon, 16 May 2016 12:51:27 +0000 (12:51 +0000)] 
Solaris: Add wrapper for setparam subcode of the door syscall.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15879

9 years agoSolaris ioctl: Add wrapper for I_FLUSH.
Ivo Raisr [Mon, 16 May 2016 11:38:29 +0000 (11:38 +0000)] 
Solaris ioctl: Add wrapper for I_FLUSH.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15878

9 years agoSolaris ioctl: Add wrapper for I_FIND.
Ivo Raisr [Mon, 16 May 2016 06:12:27 +0000 (06:12 +0000)] 
Solaris ioctl: Add wrapper for I_FIND.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15877

9 years agomips32: raise the limit for sizeof(TTEntryC)
Petar Jovanovic [Fri, 6 May 2016 17:34:55 +0000 (17:34 +0000)] 
mips32: raise the limit for sizeof(TTEntryC)

Raise limit for sizeof(TTEntryC) due to 8-byte alignement requirement for
ULong on mips32 platforms. It is a follow up to the same change on ppc32
(see r15875), and it un-breaks mips32-linux (broken with r15784).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15876

9 years agoUn-break ppc32-linux following r15784. It appears that ppc32-ELF
Julian Seward [Thu, 28 Apr 2016 15:52:01 +0000 (15:52 +0000)] 
Un-break ppc32-linux following r15784.  It appears that ppc32-ELF
layout constraints are different from x86-ELF and so the assertion on
the sizeof(TTEntryC) fails on ppc32-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15875

9 years agoSplit the structure TTEntry into hot (small) and cold (large) parts,
Julian Seward [Wed, 27 Apr 2016 16:46:04 +0000 (16:46 +0000)] 
Split the structure TTEntry into hot (small) and cold (large) parts,
TTEntryH and TTEntryC.  TTEntryH is a VexGuestExtents plus one more
field.  For scenarios involving a lot of code discarding, when the
fast-path discard mechanism does not apply, this change reduces
significantly the number of LLC misses, because such discarding
involves sequentially searching the arrays of TTEntryH's.  For recent
Firefoxes the miss rate in a 6MB L3 cache is reduced by about 1/3, as
measured by /usr/bin/perf.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15874

9 years agoFix indentation that gcc-6 -Wmisleading-indentation rightfully complaints about.
Julian Seward [Wed, 27 Apr 2016 08:19:52 +0000 (08:19 +0000)] 
Fix indentation that gcc-6 -Wmisleading-indentation rightfully complaints about.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15873

9 years agoPower PC Fix V bit error in 128-bit BCD add and subtract instructions
Carl Love [Tue, 26 Apr 2016 20:05:13 +0000 (20:05 +0000)] 
Power PC  Fix V bit error in 128-bit BCD add and subtract instructions

Update the NEWS file for this bug

VEX commit       3218
Valgrind commit 15871

Bugzilla 360035

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15872

9 years agoPower PC Fix V bit error in 128-bit BCD add and subtract instructions
Carl Love [Tue, 26 Apr 2016 19:53:56 +0000 (19:53 +0000)] 
Power PC  Fix V bit error in 128-bit BCD add and subtract instructions

The original code was using the bcdadd / bcdsub instruction on the operand
shadow bits to calculate the shadow bits for the result.  This introduced
non-zero bits shadow bits in the result.   The shadow bits for these
instructions should be set to all valid or all invalid.  If one of the
argument shadow bits was one, then all of the shadow bits of the result should
be one.  Otherwise the result shadow bits should be zero.

This patch fixes the above bug in memcheck/mc_translate.c

Fixing the above bug broke the v-bit test.  The issue is the v-bit tester
assumes the shadow bits for the operands of a given Iop can be set to one
for testing purposes.  The implementation of the bcdadd and bcdsub was passing
a constant value for the variable ps.  The ps value is an argument to the
instruction that specifies how to set the sign code of the result.  The
implementation of the instructions was changed to issue the instruction with
ps=0.  Then the result of the instruction is updated in the VEX code if ps=1.
This changed also results in cleaning up the vbit test code.

This patch also fixes the issues with the v-bit test program.

Valgrind commit 3218

Bugzilla 360035

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15871

9 years agoPower PC Add test suite support for ISA 3.0, part 2
Carl Love [Tue, 26 Apr 2016 17:37:05 +0000 (17:37 +0000)] 
Power PC Add test suite support for ISA 3.0, part 2

The test suite support for the Power PC ISA 3.0 instructions added in
VEX commit 3217 is added in this commit.

Note, this is part 2 of 5.  The NEWS file will be updated when the ISA 3.0
support is complete.

valgrind bugzilla 359767

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15870

9 years agoFix compilation breakage on platforms that do already have a definition
Julian Seward [Sun, 24 Apr 2016 17:11:44 +0000 (17:11 +0000)] 
Fix compilation breakage on platforms that do already have a definition
for Elf{32,64}_Chdr.  This is fallout from r15868.  That commit provided
a configure test, but the resulting config.h was not included here, causing
the test results to be ignored.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15869

9 years agoValgrind is able to read compressed debuginfo sections in two formats:
Ivo Raisr [Sat, 23 Apr 2016 20:28:27 +0000 (20:28 +0000)] 
Valgrind is able to read compressed debuginfo sections in two formats:
  - zlib ELF gABI format with SHF_COMPRESSED flag (gcc option -gz=zlib)
  - zlib GNU format with .zdebug sections (gcc option -gz=zlib-gnu)

Patch by: Aleksandar Rikalo <aleksandar.rikalo@imgtec.com>
Fixes BZ#303877

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15868

9 years agoFix Valgrind coredump when VG_(unimplemented)() is called
Ivo Raisr [Sat, 23 Apr 2016 19:35:11 +0000 (19:35 +0000)] 
Fix Valgrind coredump when VG_(unimplemented)() is called
early during main initialization, before the threads are
created and scheduler is initialized.
Fixes BZ#362009

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15867

9 years agoPPC64, Valgrind with GDB does not display 64-bit and 128-bit registers
Carl Love [Fri, 22 Apr 2016 15:03:46 +0000 (15:03 +0000)] 
PPC64, Valgrind with GDB does not display 64-bit and 128-bit registers
correctly

Forgot to add the new files to the previous commit 15864.

coregrind/m_gdbserver/power64-core2-valgrind-s1.xml
coregrind/m_gdbserver/power64-core2-valgrind-s2.xml
coregrind/m_gdbserver/power-vsx-valgrind-s1.xml
coregrind/m_gdbserver/power-vsx-valgrind-s2.xml
coregrind/m_gdbserver/power-vsx.xml

Bugzilla 360008 was opened for this issue.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15866

9 years agoUpdate NEWS file for Bugzilla 360008 which has been fixed.
Carl Love [Thu, 21 Apr 2016 19:56:12 +0000 (19:56 +0000)] 
Update NEWS file for Bugzilla 360008 which has been fixed.
valgrind commit 15864

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15865