Commit Graph

706 Commits

Author SHA1 Message Date
Philippe Waroquiers
c523185b76 fix 286270 VG_(env_remove_valgrind_env_stuff)
rev 12001 has introduced a regression in VG_(env_remove_valgrind_env_stuff):
to avoid modifying a possibly read-only env string, the string is duplicated,
and the copy is modified. However, mash_env_column modifies the string
"in-place". The modified string was not put back in the env (and could not,
because the src string is only partially copied).

This means that the valgrind preload strings were not cleaned up and
when a 32 bit executable execs a 64 bits (or vice versa: 64 bit execs 32 bits),
LD_PRELOAD contains both the 32 bits and 64 bits versions of Valgrind
vgpreload.... => ld.so then gives an error msg, as it can't preload either
the 32 or the 64 bits version.


The patch fixes this by duplicating the whole env string, and passing
to mash_colon_env a pointer to the correct offset in the whole env string.
The duplicated string is replacing the original entry in envp.

This patch adds two regression tests : none/tests/allexec32 and 
none/tests/allexec64. On a bi-arch valgrind, these will be 32bits and 64 bits
executables, exec-ing each other. On a single arch, one will be a symlink
to the other (to avoid different .exp files, and still test exec).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12287
2011-12-11 16:29:43 +00:00
Bart Van Assche
908268e4a0 Add command-line option --fair-sched=[no|yes|try]. Use --fair-sched=try
when running the annotate_hbefore regression test. Closes #270006.

To do: update manual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12280
2011-12-08 16:14:59 +00:00
Florian Krohm
2a7aef3ada Remove unneeded prerequisites in testcases.
Followup to r11693.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12253
2011-10-29 04:02:34 +00:00
Florian Krohm
974b65ba65 Include insn_pclmulqdq.def in tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12252
2011-10-29 03:39:56 +00:00
Florian Krohm
b798dacb8c Fix the configure test for ssse3 support. GCC needs -msse or it
will reject the xmm7 clobber in the code snippet.
Fix the prereqs for the ssse3 tests. It is possible that hardware
supports ssse3 but the tool chain does not. So we need to have the
testcase executable as a prerequisite.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12251
2011-10-28 21:37:19 +00:00
Julian Seward
084b7cb10b Fix #284384 (clang 3.1 -Wunused-value warnings in valgrind.h,
memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR
into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value
of the former would be unused.  (Bart Van Assche, bart.vanassche@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12226
2011-10-24 13:21:57 +00:00
Julian Seward
fc489f1101 Don't break fcntl locks when program does mmap. #280965.
(Rusty Russell, rusty@rustcorp.com.au)

tdb uses fcntl locks and mmap, and some of the tests fail under valgrind. 
strace showed valgrind opening the tdb file, reading 1024 bytes, then closing
it.  This is not allowed: POSIX says if you open and close a file, all fcntl
locks on it are dropped (insane, yes).

Finally got around to hacking the source to track this down: di_notify_mmap is
doing the damage.  The simplest fix was to hand in an optional fd for it to
use, then have it do pread.

I had to fix your pread; surely this should seek back even if the platform
doesn't have pread support?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12224
2011-10-24 08:53:03 +00:00
Florian Krohm
b70e46e295 Remove pth_specific.c which is unused.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12219
2011-10-23 14:34:52 +00:00
Julian Seward
f8b558a185 Update expected outputs following update of copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12208
2011-10-23 08:24:43 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Florian Krohm
f163321692 Adapt the faultstatus.c testcase to work properly on systems with larger
page size. E.g. ppc64 running SLES 11 has 64k pages.
Patch by Maynard Johnson (maynardj@us.ibm.com) with small modification
to minimize source code changes. Fixes bugzilla #283709.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12183
2011-10-21 02:32:49 +00:00
Bart Van Assche
a38ef2312e Remove filter_int because not used anywhere
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12178
2011-10-20 16:06:51 +00:00
Julian Seward
cfe0e65b27 Add (well, actually, enable existing) test cases for Thumb2 ROR
(register) encoding T2.  See #284472.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12176
2011-10-20 12:43:16 +00:00
Julian Seward
6c7425309e Add test cases for PCMPxSTRx case 0x38. See #273318.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12168
2011-10-19 20:17:50 +00:00
Julian Seward
ac3ebc6ca3 Add test cases for PMULUDQ and PCMPEQQ. Duh -- in future, add test
cases at the end, since adding in the middle changes the random
data used for all tests that follow, and makes the diff huge.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12166
2011-10-19 15:26:36 +00:00
Bart Van Assche
15fb871467 Add empty-exe regression test to the distribution tarball
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12153
2011-10-14 09:31:04 +00:00
Bart Van Assche
42c970c72f Add insn_pclmulqdq regression test files to the distribution tarball even if the system on which the tarball has been generated does not support pclmulqdq
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12152
2011-10-14 09:30:21 +00:00
Florian Krohm
5f2312e2a9 First round of changes to get make dist working again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12131
2011-10-09 23:28:47 +00:00
Bart Van Assche
0afbfb3922 none/tests/shell: An attempt to compensate for variations in bash error messages
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12129
2011-10-09 08:48:22 +00:00
Julian Seward
2eac6e7c8f Add a new .stdout.exp file, for older glibcs that print negative nans
without a minus sign.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12119
2011-10-07 12:45:49 +00:00
Julian Seward
a100fd0ade Remove two junk commas that got committed in r12117.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12118
2011-10-07 12:41:48 +00:00
Julian Seward
9d56c844ff Add a new .stdout.exp file, for older glibcs that print negative nans
without a minus sign.

Also, fix incorrect filename in Makefile.am committed in r12116.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12117
2011-10-07 12:20:46 +00:00
Julian Seward
823eb4425e Add a new .stdout.exp file, for older glibcs that print negative nans
without a minus sign.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12116
2011-10-07 12:14:05 +00:00
Julian Seward
385574f3c2 Add a new .stdout.exp file, for older glibcs that print negative nans
without a minus sign.  (sigh)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12115
2011-10-07 12:10:27 +00:00
Florian Krohm
e08c32e031 Add an .exp for s390x. Certain older kernels had a bug in providing
an invalid siginfo for SIGBUS. Hunted down and fixed by
Christian Borntraeger (borntraeger@de.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12032
2011-09-12 20:22:38 +00:00
Florian Krohm
858ecdec54 Sensitivity fix. On slow machines (s390x z900) need to sleep longer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12027
2011-09-10 18:28:57 +00:00
Florian Krohm
5c99f0796b Support CLCL and MVCL instructions. This is the non-VEX part.
Fixes #279027.  See VEX r2200.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12015
2011-09-08 15:39:10 +00:00
Julian Seward
f297abe29d Add support for IBM Power ISA 2.06 -- stage 3 -- Test cases.
Bug 279994 comment 2).
(Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12007
2011-09-05 12:15:16 +00:00
Julian Seward
7bb130f5f3 Add a new simulation hint, --sim-hints=fuse-compatible, which causes
a bunch of file-related syscalls to be handled on the might-block
syscall path rather than the fast syscall path.  This fixes deadlocks
when running some FUSE-specific filesystem codes.  Fixes #278057.
(Mike Shal, marfey@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11993
2011-08-18 15:08:20 +00:00
Tom Hughes
3cd0b25e21 Add test for address size override prefixes for REP prefixed string
instructions on amd64. Fixes remaining issues from #211371.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11969
2011-08-12 15:43:31 +00:00
Florian Krohm
6fb27ec780 Non-VEX changes to fix #275517.
Add testcase and announce fix in NEWS.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11966
2011-08-11 17:00:15 +00:00
Florian Krohm
74c0b9293d Due to a kernel bug the siginfo struct was not filled in correctly.
The si_code was incorrect not matching any of the VKI_ILL_....
cases checked in m_signals.c function default_action.
So let's have two expected output files for buggy kernels and otherwise.
Also, add op00 to the list of files to be ignored.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11964
2011-08-11 02:23:54 +00:00
Tom Hughes
1085152628 Add tests for XCHG AX, reg16 on amd64. Fixes #252695.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11962
2011-08-10 12:58:23 +00:00
Florian Krohm
315d45ed80 Followup to VEX r2189 -- handling invalid opcode 00 specially.
Update golden log for testcase op_exception which no longer
complains about invalid opcode 00.
Add testcase op00.c


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11958
2011-08-08 23:47:23 +00:00
Julian Seward
cb890807d5 The cmpxchg16b tests in this need to have 16-aligned addresses;
make it so.  Else they die with segfaults on F15.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11912
2011-07-24 21:41:41 +00:00
Julian Seward
ddd692389a Change this file to be a symlink to the identical version
in the 32-bit equivalent directory
(none/tests/ppc32/test_isa_2_06_part1.c).  Bug #277199.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11909
2011-07-24 14:35:58 +00:00
Julian Seward
e1e9809117 Add support for IBM Power ISA 2.06 -- stage 2 (testcases).
Bug 276784.  (Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11908
2011-07-24 14:20:11 +00:00
Julian Seward
492f3fd0d1 Add test cases for bug 277780. (fix for VMOV.F32).
Bug 277780.  (Mans Rullgard, mans@mansr.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11903
2011-07-19 15:49:55 +00:00
Julian Seward
79cc4f3d4d Fix regtest: the delta value printed by the VSTn with register
post-index is bogus due to an accidental stringification in the macro.
Bug 277689.  (Mans Rullgard, mans@mansr.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11902
2011-07-19 08:10:38 +00:00
Julian Seward
61b540db5e Add test cases for NEON VMUL by float scalar.
Bug 277663.  (Mans Rullgard, mans@mansr.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11901
2011-07-19 07:39:18 +00:00
Florian Krohm
210fd226e2 Valgrind-side changes to fix bug #271776.
Add testcase for s390x's STFLE instruction.
Patch provided by Divya Vyas <divyvyas@linux.vnet.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11864
2011-07-11 01:51:39 +00:00
Julian Seward
3898fc46fc Add regression tests for {ADD,SUB}W reg, reg, #uimm12 (vex r2170)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11863
2011-07-08 15:46:33 +00:00
Julian Seward
b852d4ed5a Enable testing of fres{.} and frsqrt{.} instructions. Fixes #275308.
Based on a patch by Maynard Johnson <maynardj@us.ibm.com>.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11857
2011-07-05 10:20:44 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Florian Krohm
68e01239ae Get rid of some compiler warnings.
Fixes 275339 (Christian Borntraeger <borntraeger@de.ibm.com>)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11832
2011-06-25 02:06:21 +00:00
Julian Seward
46d08c579d Minor GDBserver source tidying. Also a small usability fix: if
--vgdb-error=N is specified, print a bit of text telling the user the
magic commands to give GDB in order to attach to the process.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11822
2011-06-18 08:28:04 +00:00
Julian Seward
0ff7a2f47e Valgrind-side fixes and tests for PACKUSDW, to track r2160.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11816
2011-06-15 16:07:15 +00:00
Julian Seward
da49be7c14 Add a fourth --smc-check= variant, --smc-check=all-non-file. This
adds self-modifying-code checks to all guest code taken from mappings
which are not file backed, but omits checks in code from file backed
mappings.  This has the effect of giving complete smc-coverage of JIT
generated code -- since that is invariably generated into anonymous
mapped areas -- without burdening non-JIT generated code with such
checks.  Running Firefox 6, --smc-check=all-non-file reduces by a
factor of between 3 and 10 the number of translations requiring a self
check, compared to --smc-check=all.  These changes depend on the vex
interface changes in r2158.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11798
2011-06-07 21:39:28 +00:00
Julian Seward
27d230b660 gdbserver: (#214909 c 91)
add cleanup: line to none/tests/require-text-symbol-2.vgtest
In case Valgrind terminates abnormally, then no cleanup is done.
In this case, the abnormal termination is in the test which checks
--require-text-symbol=:*libc.so*:doesntexist
This patch adds a cleanup: line to the test.

(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11772
2011-05-17 21:35:41 +00:00
Julian Seward
2184f38863 s390x: add test cases for STCK{,E,F} instructions. See #271779.
(Christian Borntraeger <borntraeger@de.ibm.com> and Divya Vyas)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11766
2011-05-17 16:19:53 +00:00