At startup valgrind fetches the current working directory and stashes
it away to be used later (in debug messages, read config files or create
log files). But if the current working directory didn't exist (or there
was some other error getting its path) then valgrind would go in an
endless loop. This was caused by assuming that any error meant a larger
buffer needed to be created to store the cwd path (ERANGE). However
there could be other reasons calling getcwd failed.
Fix this by only looping and resizing the buffer when the error is
ERANGE. Any other error just means we cannot fetch and store the current
working directory. Fix all callers to check get_startup_wd() returns
NULL. Only abort startup if a relative path needs to be used for
user supplied relative log files. Debug messages will just show
"<NO CWD>". And skip reading any config files from the startup_wd
if it doesn't exist.
Also add a new testcase that tests executing valgrind in a deep,
inaccessible and/or non-existing directory (none/tests/nocwd.vgtest).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15989
none/tests/ppc64/jm_int_isa_2_07.stdout.exp
By convention the file jm_int_isa_2_07.stdout.exp is the big endian reuslts.
If the little endian results differ, the file has -LE appended to it.
This patch replaces the little endian results that are currenttly in
none/tests/ppc64/jm_int_isa_2_07.stdout.exp with the correct the big
endian results.
Bugzilla 369169
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15977
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
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
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
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
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
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
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
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
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
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
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
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
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
none/tests/solaris/reserve_sysstat_addr and reserve_sysstat_zone_addr.
The coredump is expected there as the test cases trigger unsupported
functionality.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15860
of an incompatible type to signal handler.
Untyped function pointer sa_handler() is no longer available
so we leverage sa_sigaction(int, siginfo_t *, void *) instead.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15858
ppoll() is not POSIX, and accordingly we should ignore the lack
of support for this on OS X.
Exclude the ppoll_alarm regression test on that platform, as
introduced in r15823.
Regression test output on OS X 10.11
Before:
n/a
After:
== 602 tests, 223 stderr failures, 13 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15851
from libstdc++ when available, similar to existing __libc_freeres().
New option --run-cxx-freeres=<yes|no> can be used to change whether
this cleanup function is called or not.
Note that __gnu_cxx::__freeres() is currently available
only in gcc 6. It is not yet decided what to do about
libstdc++ from gcc 5.
Tracked under https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69945
for libstdc++.
Fixes BZ#345307 (partially).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15840
The test suite support for the Power PC ISA 3.0 support is added in this commit. The
following files were added:
none/tests/ppc64/ppc64_helpers.h
none/tests/ppc64/test_isa_3_0.c
none/tests/ppc64/test_isa_3_0_altivec.stderr.exp
none/tests/ppc64/test_isa_3_0_altivec.stdout.exp
none/tests/ppc64/test_isa_3_0_altivec.vgtest
none/tests/ppc64/test_isa_3_0_other.stderr.exp
none/tests/ppc64/test_isa_3_0_other.stdout.exp
none/tests/ppc64/test_isa_3_0_other.vgtest
The following file was modified:
none/tests/ppc64/Makefile.am
Note, the NEWS file was not updated as the ISA 3.0 support is not complete yet. This is the
first of five sets of commits needed to add all of the ISA 3.0 support.
valgrind bugzilla 359767
Corresponding Valgrind support added in:
VEX commit 3214
valgrind commit 15837
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15838
The LDR (literal, int reg) testcase takes a code label and compares the
instructions around the label with known instructions in the code stream.
There were only fixed insns on either side of the checking instruction
which isn't enough given that offsets of +/-8 are used, instructions are
only 4 wide and the values loaded are 64bit. Newer gcc versions would
generate different code around the label and cause the tests to fail.
Add enough nops around the actual instruction to really give known
expected constant values to check against.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15829
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
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