1123 Commits

Author SHA1 Message Date
Philippe Waroquiers
826502e89a Implement command line option --valgrind-stacksize=<number>
This allows to decrease memory usage when using many threads,
if no big stacksize is needed by Valgrind.
If needed (e.g. for demangling big c++ symbols), the V stacksize
can be increased.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15004
2015-03-12 20:43:46 +00:00
Florian Krohm
b77e045e1f Rewritten to use a single line instead of line splicing
to avoid line number differences in the reported error.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14988
2015-03-07 12:49:32 +00:00
Florian Krohm
1f8ced27c3 Produce a user message in case of stack overflow.
Change VG_(extend_stack) and VG_(am_extend_into_adjacent_reservation_client)
accordingly. 
Remove some redundant checking.
Add testcase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14974
2015-03-03 14:56:17 +00:00
Florian Krohm
6bf346491b Change the testcase such that the output matches the intended output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14971
2015-03-01 09:36:54 +00:00
Florian Krohm
12401cdc41 Add a comment explaining why there are only 3 emulation warnings
and not 4 as one would expect. 
Update the .exp file to show correct line numbers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14962
2015-02-24 18:11:01 +00:00
Julian Seward
91f48cdcb7 arm64: enable test cases for conversion instructions which are
in fact implemented at this point.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14960
2015-02-24 13:24:52 +00:00
Julian Seward
0362e68ec4 arm64: enable test cases for
FRECPS  d_d_d, s_s_s 
FRSQRTS d_d_d, s_s_s 
FRECPE  d_d, s_s 
FRSQRTE d_d, s_s 
FRECPX  d_d, s_s 
FRECPS  2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
FRSQRTS 2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
FRECPE  2d_2d, 4s_4s, 2s_2s 
FRSQRTE 2d_2d, 4s_4s, 2s_2s 
 --This line, and those below, will be ignored--

M    none/tests/arm64/fp_and_simd.c
M    none/tests/arm64/fp_and_simd.stdout.exp


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14958
2015-02-24 12:21:26 +00:00
Florian Krohm
d47181fd7d Add command line flag --max-threads=<integer> to increase the number of
threads that valgrind can handle. No recompile is needed. 
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14932
2015-02-13 19:08:26 +00:00
Julian Seward
e9bceb36f4 Enable test cases for
FMOV (vector, immediate, single precision) 
  {FRINTN,FRINTM,FRINTP,FRINTZ,FRINTA,FRINTX,FRINTI} 2d_2d, 4s_4s, 2s_2s 
  {FRINTN,FRINTM,FRINTP,FRINTZ,FRINTA,FRINTX,FRINTI} d_d, s_s 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14920
2015-02-09 09:10:27 +00:00
Julian Seward
fdf85be827 Enable test cases for all remaining FP multiply instructions:
FMULX d_d_d, s_s_s 
  FMLA d_d_d[], s_s_s[] 
  FMLS d_d_d[], s_s_s[] 
  FMUL  d_d_d[], s_s_s[] 
  FMULX d_d_d[], s_s_s[] 
  FMULX 2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
  FMULX 2d_2d_d[], 4s_4s_s[], 2s_2s_s[] 
and possibly more.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14919
2015-02-08 18:26:05 +00:00
Julian Seward
2d03ad061a Enable test cases:
{FMADD,FNMADD,FMSUB,FNMSUB} d_d_d_d, s_s_s_s 
  {FMAXMNV,FMINMNV,FMAXV,FMINV} s_4s 
  {FMAXNMP,FMINNMP,FMAXP,FMINP} d_2d, s_2s 
  {FMAXNM,FMINNM,FMAX,FMIN} 2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
  {FMAXNMP,FMINNMP,FMAXP,FMINP} 2d_2d_2d, 4s_4s_4s, 2s_2s_2s 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14918
2015-02-08 12:11:52 +00:00
Julian Seward
3bba0638f9 Enable test cases for all FP compare instructions:
{FCMEQ,FCMGE,FCMGT,FACGE,FACGT} d_d_d, s_s_s 
{FCMEQ,FCMGE,FCMGT,FACGE,FACGT} d_d_#0.0, s_s_#0.0 
{FCMEQ,FCMGE,FCMGT,FACGE,FACGT} 2d_2d_#0.0, 4s_4s_#0.0, 2s_2s_#0.0 
{FCCMP,FCCMPE} s_s, d_d 
{FCMP,FCMPE} d_d, s_s 
{FCMP,FCMPE} d_#0.0, s_#0.0 



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14915
2015-02-07 21:12:04 +00:00
Julian Seward
45a0fb5e69 Allow the user to specify precise-exception behaviour for translations
made from file-backed mappings (AOT code, basically) that is different
from the default behaviour as specified by --vex-iropt-register-updates.

New flag is --px-file-backed=, with the same possible args as
--vex-iropt-register-updates has.

Add a new flag --px-default, which is a short alias for
--vex-iropt-register-updates.

Add one line of stats output when --stats=yes, showing counts of how
many translations have been made under each of the 4 different PX
optimisation settings.

No user-visible change if you don't use the new flags.

Relies on VEX API change in r3084.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14906
2015-02-05 12:59:46 +00:00
Julian Seward
f7069b81da Add test cases for AVX-1 conditional vector stores:
VMASKMOVP{D,S} xmm/ymm to memory.  Pertains to #335785.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14894
2015-01-28 11:49:46 +00:00
Julian Seward
179d4db6dd Add test cases for VPMASKMOV{D,Q} xmm/ymm to memory.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14893
2015-01-28 11:11:02 +00:00
Rhys Kidd
6043f8dc47 Re-enable building of manythreads and thread-exits tests. Patch and discussion per BZ #341613.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14861
2015-01-09 15:56:36 +00:00
Florian Krohm
48c0ff5c76 Fix BZ #116002.
Left justification of strings in myvprintf_str was mixed up.
Now fixed and %s formats changed accordingly.
In function myvprintf_int64: the local buffer was not large
enough to hold ULONG_MAX in binary notation. Numbers were
truncated at 39 digits. 
Testcases added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14808
2014-12-13 18:35:00 +00:00
Florian Krohm
f7c5c06c5d Add limited support for printing floating point numbers to
VG_(debugLog_vprintf). 
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
    specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
    integral part fits into an ULong.
This is good enough for our purposes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806
2014-12-12 19:32:10 +00:00
Julian Seward
b0ab552f48 Update expected output for none/tests/darwin/access_extended.
Fixes #341615.  (Rhys Kidd, rhyskidd@gmail.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14804
2014-12-09 22:25:47 +00:00
Florian Krohm
c57a92dda4 Update test result following VEX r3029.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14799
2014-12-05 18:29:38 +00:00
Florian Krohm
69d42e3d4b Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.
r14794 is related as well.
Also: remove -Wno-format-zero-length from compile options.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14795
2014-11-29 14:41:32 +00:00
Florian Krohm
dda3f0adf9 Add an early-clobber constraint. Otherwise, it will segfault when compiled
with gcc 4.9.2


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14793
2014-11-28 12:42:39 +00:00
Petar Jovanovic
65c74e8e8a mips64: add test cases for Cavium BBIT032 and BBIT132
This is a follow up to VEX r3028. This change adds two test cases
for Cavium instructions BBIT032 and BBIT132.

Issue tracked in BZ #339288.

Patch by Maran Pakkirisamy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14792
2014-11-26 23:50:31 +00:00
Julian Seward
05ac9a07b9 Add test cases for RORV x_x_x, w_w_w.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14784
2014-11-25 17:27:50 +00:00
Julian Seward
dd0e38662c Add test cases for CLS x_x, w_w.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14783
2014-11-25 15:51:31 +00:00
Julian Seward
fc92c36c10 Update mysteriously out-of-date fp_and_simd.stdout.exp.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14739
2014-11-20 10:11:42 +00:00
Julian Seward
f7f92b6508 Add test cases for {S,U}CVTF fixedpt-to-fp.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14738
2014-11-20 10:11:00 +00:00
Julian Seward
77b6343c0e Add test cases for VFPv4 VFNMA, VFNMS added in vex r2995.
Pertains to #340807.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14736
2014-11-19 16:09:08 +00:00
Julian Seward
179de4aea3 Enable test cases for r2993, viz:
FADDP s_2s, d_2d 
FADDP 2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
FMAX d_d, s_s 
FMIN d_d, s_s 
FMAXNM d_d, s_s (not really correct) 
FMINNM d_d, s_s (not really correct) 



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14730
2014-11-17 11:22:51 +00:00
Julian Seward
e07bc99806 Add test cases for all remaining AArch64 ARMv8 SIMD and FP instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14728
2014-11-15 22:15:47 +00:00
Philippe Waroquiers
77f136cef4 Implement Option --error-markers=<begin>,<end>
* This option can be used to mark the begin/end of errors in textual
output mode, to facilitate searching/extracting errors in output files
mixing valgrind errors with program output.

* Use the new option in various existing regtests to test the various
  possible usage.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14714
2014-11-12 19:43:29 +00:00
Julian Seward
bb19f6d8e8 Add tests for all SIMD FP instructions, except int<->fp conversions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14684
2014-11-03 09:52:57 +00:00
Philippe Waroquiers
80ae5a2395 fix 338995 shmat with hugepages (SHM_HUGETLB) fails with EINVAL
Bug is not really fixed, instead the SHM_HUGETLB flag is ignored.
Note that it is not straightforward to properly fix this,
as this implies either to learn aspacemgr what huge pages are.
Also, the trick used in the fix for 333051 cannot be used easily,
because the SHM_HUGETLB flag is given in shmget, while the mmap
is done in shmat.

So, the easiest is to just ignore the SHM_HUGETLB flag.

SHM_HUGETLB is supposed to only give a performance impact.
Ignoring it should be benign.
Theoretically, the caller might expect a sucessful shmget(SHM_HUGETLB)+shmat
to give pages aligned on e.g. 1MB.
In this case, bad luck, the program will misbehave under valgrind.
To warn of this, a warning is given (once) when SHM_HUGETLB is seen.

The map_unmap.c test has been restructured somewaht to allow
TEST_SHM_HUGETLB to be tested independently (or not) of the TEST_MAP_HUGETLB.

Note also that by default, testing  MAP_HUGETLB and SHM_HUGETLB
is disabled as usually, huge pages are not enabled.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14683
2014-11-01 22:00:50 +00:00
Philippe Waroquiers
41610f34c2 Fix 333051 mmap of huge pages fails due to incorrect alignment
Learning aspacemgr to handle huge page is too difficult.
So, huge page requests that fails due to bad advice by aspacemgr
will (we hope) succeed if a mmap retry is done with the kernel,
without any constraints.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14682
2014-11-01 21:02:13 +00:00
Julian Seward
4d6c92fda5 Rearrange the test case generators to be exactly in the same order
that they are called, so as to make future editing easier.  And
generally tidy up.  No functional change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14681
2014-11-01 12:05:09 +00:00
Julian Seward
74d6639320 Add test cases and expected outputs for
FMLA 2d_2d_d[], 4s_4s_s[], 2s_2s_s[]
FMLS 2d_2d_d[], 4s_4s_s[], 2s_2s_s[]
PRFM (immediate)

Unfortunately huge diff for arm64/fp_and_simd.stdout.exp because the
new cases are not at the end, and the random data for all after it is
different.  ToDo: reset RNG after each test.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14679
2014-10-31 10:29:23 +00:00
Florian Krohm
b21985c758 Configury and Makefile tweaks to support compilation with Intel's
ICC Compiler. Patch mostly by Gregory Czajkowski <gregczajkowski@yahoo.com>.
Fixes BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14674
2014-10-29 13:57:49 +00:00
Julian Seward
e3d289a56d Enable test cases for
LD1/ST1 (multiple 1-elem structs to/from 2 regs 
LD1/ST1 (multiple 1-elem structs to/from 3 regs 
LD1/ST1 (multiple 1-elem structs to/from 4 regs  
LD1R (single structure, replicate)  
LD2R (single structure, replicate) 
LD3R (single structure, replicate) 
LD4R (single structure, replicate) 
LD1/ST1 (single structure, to/from one lane) 
LD2/ST2 (single structure, to/from one lane) 
LD3/ST3 (single structure, to/from one lane) 
LD4/ST4 (single structure, to/from one lane)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14667
2014-10-27 09:35:12 +00:00
Julian Seward
9b30a092c4 Add --resync-filter to the --help output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14662
2014-10-23 21:49:58 +00:00
Julian Seward
f83682a8a1 Add test cases for all known arm64 load/store instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14653
2014-10-22 13:47:07 +00:00
Florian Krohm
dc3f09be77 Fix BZ 339789. /bin/true does not exist on Darwin.
Patch by rhyskidd@gmail.com.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14645
2014-10-20 21:29:26 +00:00
Florian Krohm
2884129bc1 Fix the prerequisite of the none/tests/rlimit64_nofile testcase.
Patch by rhyskidd@gmail.com. Fixes BZ 339808.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14644
2014-10-20 21:15:31 +00:00
Florian Krohm
79c843e688 Fix some testcases which implicitly assumed that TMPDIR was either
not set or set to /tmp   This is not always true. Fixes BZ 340115.
Patch by rhyskidd@gmail.com.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14643
2014-10-20 20:59:13 +00:00
Julian Seward
635bb7bca9 Hide .version directives in assembly code on Mac, since XCode doesn't
seem to like them.  Patch from Rhys Kidd (rhyskidd@gmail.com).
Fixes #339688.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14623
2014-10-12 17:02:55 +00:00
Petar Jovanovic
7449ebb921 mips64: enable soft-float build of the tests
Cavium toolchain defaults to soft-float, so it is important to enable full
build of the test suite to work in that case as well.

This boils down to protecting FPU-specific code segments with

#if defined(__mips_hard_float)
#endif


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14572
2014-09-27 05:40:33 +00:00
Petar Jovanovic
89b035b3a1 mips64: run FPU tests only when FPU is available
Check whether the target platform is meant to have an FPU before executing
tests that make use of a floating-point unit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14571
2014-09-27 05:33:07 +00:00
Florian Krohm
457f0b2d1a The testbuckets none/tests/ppc{32,64} did not build in case the
toolchain did not support -maltivec -mabi=altivec.
This should work now. Fixes BZ #338731


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14566
2014-09-24 22:02:54 +00:00
Florian Krohm
e383c673dd Ripple from constifying parameters of instrumentation functions and
callbacks from VexTranslateArgs. See VEX r2958.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14564
2014-09-24 12:06:55 +00:00
Philippe Waroquiers
0560b0dc91 Fix wrong checking of ARG2 of getrlimit
(spotted by Florian Krohm/IBM's BEAM checker)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14559
2014-09-19 19:35:24 +00:00
Julian Seward
44591524a2 Merge r14513 from 3_10_BRANCH (Update docs w.r.t. status of
partially-enabled --read-inline-info.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14520
2014-09-12 09:22:36 +00:00