Ivo Raisr [Tue, 16 May 2017 08:22:51 +0000 (08:22 +0000)]
Increase Valgrind's load address to prevent mmap failure.
Fixes BZ#374963.
Previously Valgrind failed to start when the executable contained
large text, data or bss segments. The load address was increased
for almost all platforms to 0x58000000 (from 0x38000000),
giving another 512 MB for the executable.
Julian Seward [Tue, 16 May 2017 06:20:26 +0000 (06:20 +0000)]
Bug 368507 - valgrind throws std::bad_alloc on memory allocations larger than 34255421416 bytes.
Increase the amount of usable memory from 64GB to 128GB on Linux and Solaris.
(Solaris bits from Ivo Raisr.) OSX is so far unchanged.
Petar Jovanovic [Mon, 15 May 2017 14:56:22 +0000 (14:56 +0000)]
mips: implement set/long_jmp instead of builtins
- VG_MINIMAL_SETJMP and VG_MINIMAL_LONGJMP for VGP_mips64_linux are defined.
- Implementation of VG_MINIMAL_SETJMP and VG_MINIMAL_LONGJMP for mips32 is
improved by rescuing FP registers.
Julian Seward [Sun, 14 May 2017 07:56:41 +0000 (07:56 +0000)]
Add a test for amd64 basic instructions, with particular emphasis on testing
condition codes. This is originally by Fabrice Bellard (GPL2+'d), with MD5
support from Alexander Peslyak (public domain) and has been extended to cover
ADOX and ADCX as per bug #360415.
The program generates more than 800MB of output, which it MD5 sums, so the final
MD5 sum serves as the pass/fail check. It takes roughly a minute to run.
Fix mempool2 test
mempool2 test was using a wrong address for the pool arguments
in the client requests VALGRIND_MEMPOOL_FREE.
So, instead of testing what it was supposed to test (e.g. reading
memory from a freed mempool block), this was all causing
an illegal memory pool address.
So, fix the calls, and add a specific test to verify the illegal
mempool address.
Ivo Raisr [Fri, 12 May 2017 17:18:05 +0000 (17:18 +0000)]
Reduce the number of compiler warnings on MIPS platforms in coregrind/m_mallocfree.c
Fixes BZ#370028
Patch by: Tamara Vlahovic <tamara.vlahovic@imgtec.com>
Ivo Raisr [Fri, 12 May 2017 01:16:01 +0000 (01:16 +0000)]
Reduce the number of compiler warnings on MIPS platforms in coregrind/launcher-linux.c
Fixes BZ#370028
Patch by: Tamara Vlahovic <tamara.vlahovic@imgtec.com>
Bart Van Assche [Thu, 11 May 2017 03:07:11 +0000 (03:07 +0000)]
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]
Ivo Raisr [Wed, 10 May 2017 05:43:03 +0000 (05:43 +0000)]
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.
Petar Jovanovic [Tue, 9 May 2017 15:57:59 +0000 (15:57 +0000)]
mips: reduce compiler warnings
Compiler complained about
warning: implicit declaration of function ‘vgPlain_prctl’
in coregrind/m_machine.c.
Also, it complained about
warning: no previous prototype for ‘vgSysWrap_mips_linux_sys_ptrace_before’
[-Wmissing-prototypes]
warning: no previous prototype for ‘vgSysWrap_mips_linux_sys_ptrace_after’
[-Wmissing-prototypes]
Carl Love [Wed, 3 May 2017 17:28:35 +0000 (17:28 +0000)]
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.
Rhys Kidd [Sat, 29 Apr 2017 22:06:20 +0000 (22:06 +0000)]
macos: Improve macOS 10.12 support. bz#365327.
The new macOS 10.12 way of loading dylib (placing them at the end of the currently
loaded segments) requires that Valgrind needs to know where the last segment was loaded.
A new structure (load_info_t) has been created to store all this information and easily
carry it around.
Changes:
- dyld text address is relative instead of absolute (macOS 10.12)
- Handle dylinker's offset (macOS 10.12)
- Handle the executable requesting a non-default stack address (macOS 10.12)
- Refactor to use load_info_t structure (all macOS)
Have a cleaner way to remove the massif preload from LD_PRELOAD.
The previous code was removing the massif preload (when --pages-as-heap=yes)
by replacing the entry with spaces.
This is not very clear, and I suspect this gives problems with the
android linker, which seems to use such a space entry as a real entry
to load (and then fails to start the application).
This patch really removes the entry, by shifting the characters.
Petar Jovanovic [Thu, 13 Apr 2017 16:33:06 +0000 (16:33 +0000)]
add additional stderr.exp file for helgrind/tests/pth_destroy_cond
On some platforms, Helgrind detects valid additional data race over "cond".
Thread one is at pthread_cond_wait(&cond, &mutex).
Thread two is at pthread_cond_destroy(&cond).
This fixes helgrind/tests/pth_destroy_cond on different platforms.
Petar Jovanovic [Thu, 13 Apr 2017 16:11:54 +0000 (16:11 +0000)]
increase heuristic-fence-post limit for gdbserver_tests/mcmain_pic
GDB reports to be "unable to find the start of the function" and suggests
increasing the range of the search using the 'set heuristic-fence-post'
command. So we did.
It fixes gdbserver_tests/mcmain_pic on some platforms.
Mark Wielaard [Wed, 12 Apr 2017 13:01:29 +0000 (13:01 +0000)]
Update libiberty demangler.
Update the libiberty demangler using the auxprogs/update-demangler
script to the gcc svn r246502 revision. Replaces our rust demangling
with the upstream variant (which is basically the same code in a
separate file). Adds handling of inheriting constructor. Handle
noexcept and throw-spec. Demangle Dc as decltype(auto). And various
(crasher) bug fixes.
Julian Seward [Thu, 30 Mar 2017 12:14:23 +0000 (12:14 +0000)]
Bug 358697 - valgrind.h: Some code remains even when defining NVALGRIND.
Patch from Matthias Schwarzott (zzam@gentoo.org). The patch removes
a volatile memory read which was only there to stop compilers warning
about |format| being unused.
Ivo Raisr [Thu, 23 Mar 2017 23:22:21 +0000 (23:22 +0000)]
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
Julian Seward [Mon, 20 Mar 2017 21:34:02 +0000 (21:34 +0000)]
Bug 377717 - Fix massive space leak when reading compressed debuginfo sections.
This makes reading of compressed debuginfo usable for very large object files.
It also adds a bunch extra documentation about a tricky invariant in the
compressed debuginfo handling (a recursive cache refill path!) and adds a
whole bunch of assertions.