9800 Commits

Author SHA1 Message Date
Florian Krohm
b87aa67392 Final patch for Char/HChar mixups.
Remove -Wno-pointer-sign from configure.in.
Fixes 273227.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13125
2012-11-18 00:36:15 +00:00
Carl Love
59fc40a7f3 vbit-tester, add counts for the number of 1, 2, 3 and 4 operand tests.
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
2012-11-16 19:41:21 +00:00
Carl Love
adfd3e03b1 Valgrind, V-bit tester: Add support for Iop_CmpORD class iops
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
2012-11-16 18:58:08 +00:00
Florian Krohm
117196ac6d Char/HChar fixups for m_debuginfo and m_gdbserver.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13122
2012-11-15 04:27:04 +00:00
Florian Krohm
12fec34e2f Add missing files. They should have been added in r13120.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13121
2012-11-11 13:59:54 +00:00
Florian Krohm
78ec60e0e7 Update s390_features.c for DFP.
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
2012-11-10 22:35:24 +00:00
Florian Krohm
d0aa69c331 Fix more Char/HChar mixups. Closing in...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119
2012-11-10 22:29:54 +00:00
Florian Krohm
d29742d1f8 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13118
2012-11-10 20:11:14 +00:00
Christian Borntraeger
bf1836a5d9 add BLKPBSZGET ioctl
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13117
2012-11-09 16:01:38 +00:00
Christian Borntraeger
d0b18e8cf4 Add missing EXTRA DIST statement
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13116
2012-11-09 08:35:50 +00:00
Christian Borntraeger
73744bb25f GETREGSET was introduced with 2.6.33.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13115
2012-11-09 08:06:14 +00:00
Florian Krohm
5dc9f96b48 Announce fix for BZ 308886.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13114
2012-11-08 23:04:16 +00:00
Christian Borntraeger
a4b734a6ac also wire up arm, x86 and amd64 regarding ptrace regsets
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
2012-11-08 20:27:05 +00:00
Christian Borntraeger
4155f1b382 add s390 specific fix for getregset
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13112
2012-11-08 20:10:10 +00:00
Christian Borntraeger
b5bb5fa736 wire up testcase
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13111
2012-11-08 19:46:29 +00:00
Christian Borntraeger
6c0b993485 Add ptrace getreset testcase from Andreas Arnez
arnez AT  linux DOT vnet DOT ibm DOT com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13110
2012-11-08 19:42:00 +00:00
Julian Seward
5bbaebd031 Ignore ELF sections that have zero size. Fixes #309600.
(Dragos Tatulea, dragos.tatulea@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13109
2012-11-08 15:45:16 +00:00
Julian Seward
1ef2516cd3 Improve accuracy of definedness tracking through the x86 PMOVMSKB and
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
2012-11-08 10:58:16 +00:00
Christian Borntraeger
797e1fd67d Same idea as for mips. sem_post does not fail on s390
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13107
2012-11-07 13:42:36 +00:00
Christian Borntraeger
ad1814e451 s390x machines z196 and zec12 have 4 levels of caches. Adopt the test suite
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13106
2012-11-07 07:57:01 +00:00
Philippe Waroquiers
d7eae8afe5 fix n-i-bz same as 303624 (fixed in 3.8.0), but for x86 android
(note: this might be a candidate if a 3.8.2 is done).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13105
2012-11-06 22:47:00 +00:00
Philippe Waroquiers
88d11f08b4 factorise sys_socketcall
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
2012-11-04 20:40:33 +00:00
Florian Krohm
5de39dd72a Fix Char/HChar mixups and constness in m_scheduler.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13103
2012-11-03 19:32:28 +00:00
Florian Krohm
b906e8df12 Fix Char/HChar mixups and constness in m_initimg.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13102
2012-11-03 19:18:10 +00:00
Florian Krohm
eec3191320 Char/HChar and constness fixes in m_ume
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13101
2012-11-03 18:28:20 +00:00
Florian Krohm
5a27187a2a s390: Autodetect cache info. These are the final bits to fix BZ 275800.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13100
2012-11-02 22:00:59 +00:00
Florian Krohm
505661509e Tweak VG_(machine_get_cache_info).
Better messages. Always write cache info when in debug mode.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13099
2012-11-02 21:36:39 +00:00
Philippe Waroquiers
3e427a3bff Ensure vgdb.c is warningless with -Wpointer-sign
* 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
2012-11-01 17:00:12 +00:00
Philippe Waroquiers
418dc54963 fix arena size wrongly printed in debugmsg on 32 bits platforms when > 2Gb.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13097
2012-10-31 22:10:47 +00:00
Philippe Waroquiers
cd8e4e9bde for debuglevel >=2, ensure write_buf debug output only writes the req nr of char
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13096
2012-10-31 15:07:39 +00:00
Josef Weidendorfer
ca4eecd8d2 Cachegrind: introduce special case for Ir
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
2012-10-30 00:28:29 +00:00
Josef Weidendorfer
3cb1abdb61 Callgrind: use memory block number as tag for simple model
Same as in Cachegrind. Gives a slight speedup.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13094
2012-10-29 21:47:45 +00:00
Josef Weidendorfer
02838bf16f Use always_inline attribute also in Callgrinds simulator
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13093
2012-10-29 21:28:05 +00:00
Josef Weidendorfer
9309e156a7 Get rid of compiler warning
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
2012-10-29 21:28:03 +00:00
Carl Love
b8c5c508da Valgrind, ppc: Fix test for 32-bit testsuite.
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
2012-10-29 20:39:18 +00:00
Florian Krohm
dfcb17173d Unbreak testcase.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13090
2012-10-28 20:26:04 +00:00
Florian Krohm
25b18b0aa1 Char/HChar and constness fixes. Mostly cost center
on allocators which is always a const HChar *


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13089
2012-10-27 23:07:42 +00:00
Florian Krohm
5337376bf2 More Char/HChar fixes and constification.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088
2012-10-27 18:39:11 +00:00
Florian Krohm
751c0cc4f8 Update list of ignore files. This time with the correct name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13087
2012-10-27 17:46:44 +00:00
Florian Krohm
10f9d4160e Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13086
2012-10-27 16:34:31 +00:00
Florian Krohm
6dd9c9fe50 Fix fpconv.c to unbreak the build on z10ec.
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
2012-10-27 14:25:28 +00:00
Petar Jovanovic
d75506405e Additional refinement in PRE(sys_ipc).
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
2012-10-26 16:16:43 +00:00
Julian Seward
c2bb7ebab0 Update with latest bugmail header lines.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13083
2012-10-26 10:28:24 +00:00
Philippe Waroquiers
85947ee43b fix 123837 semctl system call: 4rth argument is optional, depending on cmd
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
2012-10-23 21:38:52 +00:00
Bart Van Assche
3fd464fbf3 Remove build dependency on Xen header files - closes #308495
From: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13081
2012-10-23 18:03:28 +00:00
Petar Jovanovic
eab0663602 Reserve space for frame header in disp_run_translations for MIPS.
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
2012-10-22 17:43:57 +00:00
Philippe Waroquiers
e344ae06dd Follow-up to sys_ipc restructuration
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
2012-10-21 21:49:33 +00:00
Philippe Waroquiers
78966742aa Follow-up to sys_ipc restructuration
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
2012-10-21 21:13:39 +00:00
Philippe Waroquiers
6c471293d4 Fix 308711 - give more info about aspacemgr and arenas in out_of_memory
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
2012-10-21 21:03:11 +00:00
Philippe Waroquiers
b83003a1e0 restructure code for future fixing of 123837 (semctl GETVAL false positive)
Regrouped identical code (except for indentation)
from syswrap-ppc64-linux.c, syswrap-ppc32-linux.c,syswrap-mips32-linux.c
  syswrap-x86-linux.c, syswrap-s390x-linux.c
into
  syswrap-linux.c

(compiled/regtested on x86, amd64, ppc64, mips32, s390x)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13076
2012-10-21 20:21:17 +00:00