This patch adds code to count the number of each type of test. The
number of 1, 2, 3 and 4 operand tests that are generated by the vbit-tester
are counted and printed by the vbit-tester. The user should refer to the
Valgrind output to see if any of the tests failed.
The existing two verbose levels was increased by one level and the the
new output giving the number of tests was inserted as the first verbose
level. The verbose levels are now:
-v shows the number of 1, 2, 3 and 4 operand tests that are generated
-v -v shows IROps being tested
-v -v -v extreme edition, shows input values
This patch is for bugzilla 309229
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13124
The Iop_CmpORD class of iops support the POWER specific comparison
instructions. The instructions take two 32-bit or 64-bit operands
and produce a result of the same size. However, only the lower bits
of the result are set by the instruction. The bits are set by the instruction
to indicate if the comparison is "less then", "greater then", or "equal".
This patch adds support to the V-bit tester to verify the propagation
of the undefined bits in the inputs to the output for the Iop_CmpORd iops.
The output bits are always set to undefined if any of the input bits are not
defined.
This patch is for bugzilla 310169
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13123
Add a testcase.
Patch by Maran (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
See also VEX r2560.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13120
original patch from
Andreas Arnez <arnez AT linux DOT vnet DOT ibm DOT com>
Seems that ppc and mips dont have ptrace support....
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13113
BSF instructions, as the lack of it causes false positives (Valgrind
side). Fixes#308627. (Patrick J. LoPresti <lopresti@gmail.com>)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13108
sys_socketcall was duplicated in syswrap-{ppc64|ppc32|arm|mips32|s390x}-linux.c
=>
* Similarly for what was done for sys_ipc, factorise the code in syswrap-linux.c
* re-enabled PRE_MEM_READ for VKI_SYS_SENDMSG and VKI_SYS_RECVMSG
(PRE_MEM_READ calls were commented out around 2003, for what
was supposed a glibc bug.
The PRE_MEM_READ calls were already re-enabled in s390x)
* s390x also had some more checking to verify the addressibility of
the args and fail the syscall with EFAULT if not addressable
=> same checks are now done for all platforms.
(tested on x86/amd64/mips32/s390x/ppc32/ppc64,
compiled for arm-android-emulator)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13104
* use normal 'char' (when possible) rather than 'unsigned char'
* fix bug in case a character val >= 128 is given in a -c command
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13098
Because most Ir accesses touch only one line, and this
can be detected at instrumentation time, use a special
handler for that. This handler does not need to check
cache line crossing at runtime.
This does not change the results of the simulator at all,
but improves runtime by around 15% on perf benchmarks.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13095
In addition to "__attribute__((always_inline))", gcc wants
"__inline__" to be used, otherwise the warning
warning: always_inline function might not be inlinable
is printed. However, this does not have any effect on
performance (probably "static" makes gcc 4.7 already inlining
the functions?).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13092
The 32-bit testsuite executes the 64-bit class instruction prtyd. This
instruction should not be tested in 32-bit mode. The change also updates
the expected output for the test. Note, 32-bit HW will generate a SIGILL
when the prtyd instruction is executed. However, the 64-bit HW executing
a 32-bit application does execute the instruction but only the lower 32-bits
of the result are valid. In general, the 64-bit class instructions should
not be executed in 32-bit binaries.
This fix accompanies the VEX fix in revision 2558 to add the 64-bit mode test
to make sure the 64-bit class instructions are only executed in 64-bit mode.
The VEX bugzilla is:
Bug 308573 - Internal Valgrind error on 64-bit instruction executed in
32-bit mode
Carl Love cel@us.ibm.com
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13091
Add rounding-6.c to test rounding modes for convert-to-fixed per m3
field. (The previous fpconv gave the impression of testing this but
in fact did not).
Add rounding.h to establish symbolic names for the various rounding
modes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13085
Additional refinement in PRE(sys_ipc) on which arguments to check for the call.
This is still a simplistic check, yet it should resolve additional cases.
One of the resolved cases is memcheck/tests/sem on MIPS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13084
Depending on the semctl command (arg3), arg4 might or might not be needed.
The PRE(sys_ipc) multiplexed syscall for semctl was always checking
all 4 args.
The fix consists in dereferencing the 4th arg (which in sys_ipc is ARG5)
only if the semctl syscall cmd implies 4 arguments.
This avoids the false positive on linux x86.
Note that PRE(sys_ipc) is still too simplistic as it assumes
that 6 args are always read, which is not the case.
This seems to cause false positive on mips:
memcheck on none/tests/sem gives:
Syscall param ipc(fifth) contains uninitialised byte(s)
It would be nice to implement the multiplexed PRE(sys_ipc) by
calling the PRE(sys_xxxx) similar PRE, depending on ARG1 of sys_ipc.
This would then avoid the simplistic PRE(sys_ipc) logic without duplicating
the logic in PRE(sys_semctl) (and all other sys_ipc multiplexed syscalls).
However, I found no easy way to do that.
With the current fix, some logic about semctl is partially duplicated between
the PRE(sys_ipc) (for platforms such as x86 having a multiplexed sys call)
and PRE(sys_semctl) (for platforms such as amd64, having a direct sys call)
to fix the false positive encountered on x86.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13082
Reserve space for frame header in disp_run_translations, as some optimizations
may decide to use it. This should fix issue #307141.
Related link:
https://bugs.kde.org/show_bug.cgi?id=307141
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13080
Rev 13078 removed a PRE call (for SEMCTL) in the POST(sys_ipc).
This commit adds the correct POST call for SEMCTL in POST(sys_ipc).
(note: some tests are missing in this area, as removing PRE
and adding POST did not cause any test result to change).
This is the last patch to restructure the sys_ipc code.
After this patch, should be able to do the real fix
for 23837 (semctl GETVAL false positive)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13079
Now that the PRE/POS(sys_ipc) code is not duplicated anymore,
fix two strange things in this code:
* PRE(sys_ipc) : add missing ; after the call PRE_REG_READ6
(strange that this was compiling without it ???)
* POST(sys_ipc) : it seems there was a copy/paste of
the PRE(sys_ipc) code for VKI_SEMCTL.
Cannot understand why we would need to call again
deref_Addr and ML_(generic_PRE_sys_semctl) in the POST(sys_ipc).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13078
In case of out of memory, Valgrind will output
the state of the address space manager and of the arena.
Then it will output a message to inform the user about the out of memory.
In case out of memory happens again while outputting the aspacemgr
or arena info, then another trial is done to only output the user msg.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13077