2019 Commits

Author SHA1 Message Date
Bart Van Assche
2393a4c5ca tests: Remove exception specifications
Exception specifications are a deprecated feature in C++11 and gcc 7
complains about these specifications. Hence remove these specifications.
This patch avoids that gcc reports the following:
    
  warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16360
2017-05-11 03:07:11 +00:00
Ivo Raisr
aa0dc56441 Reduce the number of compiler warnings on MIPS platforms.
Patch by: Tamara Vlahovic <tamara.vlahovic@imgtec.com>
Partially fixes BZ#370028.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16352
2017-05-10 12:52:40 +00:00
Ivo Raisr
84ad3a82c2 Fix compilation problems with some unit tests on Ubuntu 16.10+.
Compiler produces position independent executables (PIE) by default
which gets in the way of some unit tests.
Fixes BZ#377066.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16349
2017-05-10 05:43:03 +00:00
Ivo Raisr
246bb0e25f Remove TileGX/Linux port.
Fixes BZ#379504.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16340
2017-05-08 17:21:59 +00:00
Ivo Raisr
d8f648486e Fix some spelling mistakes.
Fixes BZ#374719
Patch by: klemens <ka7@la-evento.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16336
2017-05-05 22:13:20 +00:00
Ivo Raisr
38edd50c0e Update copyright end year to 2017 in preparation for 3.13 release.
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16333
2017-05-04 15:09:39 +00:00
Carl Love
6c88349325 PPC64 ISA 3.0B, add support for the additional instructions: addex, mffscdrn,
mffscdrni, mffsce, mffscrn, mffscrni, mffsl. vmsumudm.

Additionally, the OV32 and CA32 bits were introduced in ISA 3.0 but
Valgrind add support for setting these bits for ISA 3.0.  The OV32 and CA32
bits must now be set on a number of pre ISA 3.0 instructions.  So now the
instructions produce different results in the XER register.  Thus we need pre
and post ISA 3.0 expect files.  Command line options were added to thee 
pre ISA test cases so instructions that didn't change could be run with one
set of command line args.  The instructions that have different XER results
are run using a different set of command line args.  The tests were split into
two, one for instructions that didn't change on for instructions that do 
change under ISA 3.0.  We then create ISA3.0 expect files only for the tests
that run differently.  By doing this we minimized the size of the expect files
needed.

Vex commit 3359  Has the source code changes for the instruction and OV32, CS32
support

This commit is all the test case changes, adding the new test case files.

Valgrind bugzilla 378931

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16329
2017-05-03 17:28:35 +00:00
Ivo Raisr
99d603d2eb Follow up to SVN r16311.
Fix mismerge from SVN r16314.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16315
2017-04-27 07:45:16 +00:00
Ivo Raisr
c356e1c01f Syscall wrapper for prctl(PR_SET_NAME) must not check more than 16 bytes.
Fixes BZ#379039.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16314
2017-04-26 19:27:14 +00:00
Ivo Raisr
e8a32aa888 Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper.
Fixes BZ#379094.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16311
2017-04-25 06:44:28 +00:00
Julian Seward
9d6e165ea7 Bug 369459 - valgrind on arm64 violates the ARMv8 spec (ldxr/stxr)
This implements a fallback LL/SC implementation as described in bug 344524.

Valgrind side changes:

* Command line plumbing for --sim-hints=fallback-llsc

* memcheck: handle new arm64 guest state in memcheck/mc_machine.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16309
2017-04-24 09:24:57 +00:00
Ivo Raisr
8d35572e60 Fix an INTERNAL ERROR problem in execve syscall wrapper.
Fixes BZ#378535.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16301
2017-04-10 20:36:00 +00:00
Ivo Raisr
76e451c60d fcntl syscall wrapper was missing flock structure check on Linux.
Fixes BZ#377930.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16287
2017-03-27 05:06:32 +00:00
Bart Van Assche
935a7fcdd8 memcheck/tests/unit_oset.c: Fix compiler warnings
Avoid that the compiler warns about using the result of an assignment
as a truth value.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16286
2017-03-24 02:07:14 +00:00
Ivo Raisr
d9f02db4c8 Fix for 377698 - Missing memory check for futex() uaddr arg for FUTEX_WAKE,
and FUTEX_WAKE_BITSET, check only 4 args for FUTEX_WAKE_BITSET,
and 2 args for FUTEX_TRYLOCK_PI.
Fixes BZ#377698.
Patch by: diane.meirowitz@oracle.com


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16285
2017-03-23 23:22:21 +00:00
Petar Jovanovic
ff3c67a396 mips: improve emulation of LL/SC
Follow up to VEX r3316.

Related issue KDE #344524.

Patch by Maran Pakkirisamy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16269
2017-03-13 17:55:07 +00:00
Ivo Raisr
fc10a2f3de Solaris: include <sys/lgrp_user_impl.h> only on newer Solaris.
Follow up to SVN r16224 and r16225, BZ#376455. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16226
2017-02-15 15:22:05 +00:00
Ivo Raisr
72a8b52a60 Solaris: Add additional subcodes for lgrpsys(180) syscall
Fixes BZ#376455.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16225
2017-02-14 12:38:06 +00:00
Ivo Raisr
0f667376e6 Solaris: Add syscall wrapper for lgrpsys(180)
Fixes BZ#376455.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16224
2017-02-14 10:35:20 +00:00
Petar Jovanovic
16df59b858 fix leak-segv-jmp test for platforms with 64K pagesize
Increase the size of allocated array, so mprotect call does not end up
protecting non-allocated areas. This enables the test to work on
platforms with pagesize=64K.

Issue discovered on MIPS XLP machine with 64K pagesize.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16220
2017-02-03 01:19:55 +00:00
Petar Jovanovic
33a203f1cb force old implementation of std::string for leak_cpp_interior test
This patch forces leak_cpp_interior to be compiled using old implementation
of std::string.

Related issue #373069

Patch by Aleksandar Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16217
2017-01-31 18:22:20 +00:00
Philippe Waroquiers
22fb38cb1c Samll changes on xtree leak event short names
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16214
2017-01-29 16:11:19 +00:00
Petar Jovanovic
9f6e3a5cb5 Adding new filter to memcheck/tests/filter_stderr
This should fix issue with sendmsg test and glibc 2.22.

Glibc 2.22 introduced sysdeps/unix/sysv/linux/sendmsg.c that has
__libc_sendmsg function implementation (in comparison to earlier
implementation in syscall-template.S).
So, test suite needs to filter out this case, otherwise we get test
diffs such as:

 Syscall param sendmsg(msg) points to uninitialised byte(s)
-   at 0x........: sendmsg (in /...libc...)
+   at 0x........: sendmsg (sendmsg.c:28)

which are false positives.

This fixes memcheck/tests/sendmsg (stderr) on platforms with 2.22+ glibc.

Patch by Aleksandra Karadzic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16213
2017-01-27 18:20:50 +00:00
Petar Jovanovic
795ee051e6 mips32: add support for ptrace syscall
Add wrapers for ptrace syscall for mips32.

Patch by Aleksandra Karadzic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16211
2017-01-27 17:01:49 +00:00
Philippe Waroquiers
e696a029ca Similar to xtree memory, give a user msg with the xtree leak filename
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16208
2017-01-21 15:46:44 +00:00
Philippe Waroquiers
d9ca38cdc8 Fix --help for --xtree-leak-file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16207
2017-01-21 13:22:06 +00:00
Philippe Waroquiers
5788cf1880 xtree leak.
As option --xtree-leak=yes is useless without a full leak report,
sets automatically full leak report if xtree leak report is requested.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16206
2017-01-21 12:20:33 +00:00
Philippe Waroquiers
c972a2b8b0 Allow memcheck to output the leak results as a callgrind xtree file.
* New command line options --xtree-leak=no|yes and --xtree-leak-file=<file>
  to produce the end of execution leak report in a xtree callgrind format
  file.

* New option 'xtleak' in the memcheck leak_check monitor command, to
  produce the leak report in an xtree file.

* File name template arguments (such as --log-file, --xtree-memory-file, ...)
  have a new %n format letter that is replaced by a sequence number.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16205
2017-01-21 11:00:39 +00:00
Julian Seward
8840b0bb8d Add support for Iop_MaxNumF64, Iop_MinNumF64, Iop_MaxNumF32 and
Iop_MinNumF32, as introduced in vex r3293.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16202
2017-01-13 18:02:38 +00:00
Philippe Waroquiers
488f1cc4dc Do not capture the free stacktrace in memcheck, unless we have
either to keep the free stacktrace and/or to compute full xtree memory.

Also, properly compute avg nr of IP per execontext: the avg must
be computed using the real nr of execontext stored, not the hash
table size.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16199
2017-01-11 22:13:52 +00:00
Ivo Raisr
61b7d61d7b Rename BBPTR to GSPTR as it denotes guest state pointer only
Fixes BZ#373555.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16189
2016-12-16 21:21:05 +00:00
Ivo Raisr
744910ac3b Some housekeeping related to recent r16175.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16176
2016-12-06 08:47:30 +00:00
Petar Jovanovic
55c565435d mips: add regression test for fadvise64
Add regression tests for fadvise64.

Change by A Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16175
2016-12-05 18:00:01 +00:00
Petar Jovanovic
d91042c29d Add CLEAR_CALLER_SAVED_REGS in leak-tree test
Motivation for this change is similar to what has already been done in other
leak-* tests. That is, call CLEAR_CALLER_SAVED_REGS (currently used only on
PPC and MIPS arches) to clear temporary registers that might be holding 
pointers lost in a previously called function.

This fixes memcheck/tests/leak-tree failure on some MIPS platforms.

Patch by Aleksandar Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16173
2016-12-05 16:29:24 +00:00
Petar Jovanovic
992cea3551 mips: implement CLEAR_CALLER_SAVED_REGS for memcheck tests
Implement CLEAR_CALLER_SAVED_REGS macro that is used for some memcheck
tests. This is done in order to clear temporary registers that still
might be holding pointers to lost memory regions.
Similar change has been made for PPC.

This fixes the following tests:

memcheck/tests/leak-cases-full           (stderr)
memcheck/tests/leak-cases-summary        (stderr)
memcheck/tests/leak-cycle                (stderr)
memcheck/tests/lks                       (stderr)

on some MIPS platforms.

Patch by Aleksandar Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16172
2016-12-05 16:03:21 +00:00
Philippe Waroquiers
d513fcfe77 xtree: some documentation and --help-debug fine tuning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16146
2016-11-20 11:41:25 +00:00
Ivo Raisr
8f6ff4a27b Solaris: Add syscall wrapper for sigsendsys(108)
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16145
2016-11-20 05:19:02 +00:00
Ivo Raisr
8e08fc91ec Solaris: Add syscall wrapper for sigsuspend(95)
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16144
2016-11-20 00:20:34 +00:00
Philippe Waroquiers
b10e381272 Support for xtree memory profiling and xtmemory gdbsrv monitor command in memcheck
* memcheck will produce xtree memory profiling according to the options
  --xtree-memory.
* addition of the xtmemory gdbserver monitor command.

(this is the second real xtree functional difference)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16128
2016-11-11 14:36:36 +00:00
Philippe Waroquiers
aa630a3169 Locally define vgPlain_scrcmp in 2 unit tests
Humph, this should have been part of :
   16122 Add VG_(strIsMemberXA) in pub_tool_xarray.h
which means that between 16122 and this revision, these 2 unit tests
will (very probably) not compile.
That will make bissect not easy :(


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16126
2016-11-11 14:26:54 +00:00
Ivo Raisr
89046d2a5c Move scalar test of lwp_private syscall to platform specific directories
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16114
2016-11-02 22:33:16 +00:00
Ivo Raisr
2dbada9642 Follow up to SVN r16105.
Forgot to include scalar.stderr.exp changes in the commit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16107
2016-10-26 09:44:39 +00:00
Ivo Raisr
a32762d529 Solaris: Add wrapper for fcntl(F_DUPFD_CLOEXEC)
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16105
2016-10-25 04:55:35 +00:00
Carl Love
ae13bd7244 Update memcheck/tests/ppc64/power_ISA2_05.vgtest
The option   --workaround-gcc296-bugs=yes has been depricated and 
replaced with the option --ignore-range-below-sp=1024-1

Updated the vgtest file with this change.

No associated bugzilla.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16079
2016-10-19 17:23:19 +00:00
Julian Seward
766292973d Add to Memcheck a flag --ignore-range-below-sp=<offset>-<offset>, for
ignoring accesses on the stack below SP.  Serves as a more modern
replacement for --workaround-gcc296-bugs, which is now deprecated.
Fixes #360571.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16073
2016-10-18 17:16:11 +00:00
Ivo Raisr
4fadc6cb88 Introduce leak-pool-3.* back into EXTRA_DIST as they are not related
to leak-autofreepool tests.
This is a follow up fix for r16042.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16043
2016-10-16 08:07:30 +00:00
Philippe Waroquiers
38fab04de9 Clarify name and description/manual for meta mempool
* rename macro VALGRIND_CREATE_META_MEMPOOL
     to VALGRIND_CREATE_MEMPOOL_EXT
* abort execution if a pool is marked as auto_free but is not a meta pool
  + removed test leak-autofreepool-3.vgtest, which now aborts.
* reword/clarify valgrind.h explanations for meta pool
* similarly reword/clarify the manual



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16042
2016-10-15 12:59:04 +00:00
Philippe Waroquiers
7ac00163a3 fix 369468 Remove quadratic metapool alg. using VG_(HT_remove_at_Iter)(VgHashTable *table)
Based on a patch from Ruurd Beerstra
but reworked VG_(HT_remove_at_Iter) so that
the function is implemented without touching the rest of m_hashtable.c
to ensure no performance impact on other hash table usages.

Testing with
for f in 1 2 3 4 5 6 7 8 9; do echo $f;  time ./vg-in-place -q ./memcheck/tests/leak-autofreepool 2 $(expr $f \* 100000); done|&grep user

With the patch :
user	0m0.524s
user	0m0.660s
user	0m0.784s
user	0m0.916s
user	0m1.064s
user	0m1.192s
user	0m1.316s
user	0m1.496s
user	0m1.632s

Without the patch, the same gives:
user	0m4.464s
user	0m16.776s
user	0m24.472s
user	1m5.544s
user	1m21.168s
user	1m40.500s
user	1m54.884s
user	4m58.308s
user	5m34.060s



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16041
2016-10-15 09:30:39 +00:00
Carl Love
ffb3146248 Fix for missing ISA changes in HW cap stuff needs updating patch
A couple things got missed in the previous HW cap stuff needs updating patch
that cause the vbit tester to fail.  The fixes are based on the patch
submitted by Mark Weilaard.

The changes were missed in Valgrind commit 16034

bugzilla 370265

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16037
2016-10-11 17:01:42 +00:00
Mark Wielaard
dc24612c87 Add a warning to the get/set_thread_area wrapper for bad info pointers.
Also adjust the scalar.stderr.exp to catch the new warnings.

Patch by Julian Seward <jseward@acm.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16025
2016-10-05 19:51:53 +00:00