721 Commits

Author SHA1 Message Date
Philippe Waroquiers
12633f0117 Modify none/tests/execve.c so to avoid infinite loop with --trace-children=yes
With --trace-children=yes, none/test/execve exec ve forever.

This avoids an infinite loop when running outer on inner regression
tests (for which --trace-children=yes is mandatory for the outer).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12440
2012-03-11 20:47:41 +00:00
Florian Krohm
f41f7ad456 Fix a testcase. Constraint was incorrect allowing r0 to be used
for the EX insn. Patch by Christian Borntraeger (borntraeger@de.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12417
2012-03-05 23:12:47 +00:00
Bart Van Assche
d5ba78f638 none/tests/mq.c: Fix a copy-paste bug
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12413
2012-03-02 09:57:14 +00:00
Tom Hughes
35cc294c29 Handle prlimit64 the same way we do getrlimit and setrlimit, with
some requests trapped and handled by valgrind.

Patch from Matthias Schwarzott via BZ#294047.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12411
2012-03-01 13:42:18 +00:00
Julian Seward
7d0b1685f1 Add test cases for MPSADBW. See #294048.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12395
2012-02-21 11:03:38 +00:00
Julian Seward
48d927757d Add test cases for PHMINPOSUW (SSE 4.1). See #287301.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12390
2012-02-16 22:02:47 +00:00
Julian Seward
2ef374fd74 Add test cases for 16 bit PCMPxSTRx variants. See #293754.
(Eliot Moss, moss@cs.umass.edu)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12389
2012-02-16 15:24:17 +00:00
Florian Krohm
ea211346f8 Use LC_ALL=C for a controlled environment.
Patch by zzam@gentoo.org. Fixes #294055.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12386
2012-02-15 03:57:27 +00:00
Philippe Waroquiers
913ae97e07 * fix Bug 290655 - Add support for AESKEYGENASSIST instruction
(Valgrind part : test for AES instructions (AESKEYGENASSIST, AESIMC,
  AESENC, AESENCLAST, AESDEC, AESDECLAST).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12384
2012-02-14 21:35:46 +00:00
Tom Hughes
74eb6fb3b4 Add support for process_vm_readv and process_vm_writev system calls.
Patch from Lénaïc Huard to fix BZ#292995.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12374
2012-02-10 09:39:37 +00:00
Florian Krohm
6874ede370 Add testcases for TR, TRE, TRTT, TROT, TRTO insns.
Fixes #273114. Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12368
2012-02-04 17:16:40 +00:00
Bart Van Assche
045137d886 none/tests/x86/bug125959-x86 language conformance fix: do not trigger signed integer overflow. Fixes #292628.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12358
2012-01-28 14:20:30 +00:00
Florian Krohm
4b9b13911c Add support for the s390's TROO insn. These are the valgrind bits.
Detect ETF2 enhancement facility using STFLE. Add testcases.
Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com) with
modifications. Partial fix of #273114


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12335
2012-01-15 21:02:44 +00:00
Florian Krohm
b8466723cd Beef up VG_(strerror) to provide correct messages for the
errno codes in asm-generic/errno-base.h (on linux). 
The error strings were obtained by calling strerror natively in
Linux. 
Extend vki-linux.h accordingly. vki-darwin.h already had
those errno codes.
Add testcase. This fixes #287858.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12316
2011-12-24 21:50:53 +00:00
Philippe Waroquiers
e52f0e1de0 * none/tests/linux/mremap3.vgtest : new test
mremap3.c based on testcase provided by Jan Engelhardt
* coregrind/m_syswrap/syswrap-generic.c
  - The two 'no-thrash checks' that were introduced to fix bug #129866
    were (probably) broken when adress space manager was reworked.
    The new VG_(am_get_advisory_client_simple) returns NULL for a free
    segment, but the check was based on checking not NULL and then
    that the state is free.
    => replaces these two local checks by a call to the new
    am Bool VG_(am_covered_by_single_free_segment) function.

* coregrind/pub_core_aspacemgr.h
  coregrind/m_aspacemgr/aspacemgr-linux.c
  - new function Bool VG_(am_covered_by_single_free_segment)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12314
2011-12-22 13:25:58 +00:00
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