Commit Graph

10046 Commits

Author SHA1 Message Date
Julian Seward
c990b98d2a Minor changes to how V{LD}{1,2,3,4} are tested:
* print the output 64-bit results in most-to-least-significant
  lane format
* change the memory values used in these tests to ones which
  are reliably able to detect confusion of 8-bit lanes.  The
  previous values couldn't to that reliable.  This change causes
  the diff to be huge because the stdout.exp changes a lot.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13374
2013-04-20 23:43:49 +00:00
Petar Jovanovic
c159bbeb8a Calculate offsets in read_dwarf2_lineblock based on is64
Reading header length and values in external line info was incorrect at
some places as it used offsets based on dw64 that came from .debug_info.
Instead, offsets should be calculated based on is64 from .debug_line.
This issue surfaced in MIPS64 port, and it was discussed at:

https://bugs.kde.org/show_bug.cgi?id=313267#c20


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13373
2013-04-19 15:23:44 +00:00
Julian Seward
434ec6b7f5 Non-functional changes: flush stdout frequently, so as to make
it easier to sync with stderr output.  Also, add some more helpful
data for testing Neon loads/stores.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13372
2013-04-18 11:52:19 +00:00
Mark Wielaard
fc14d93e00 Fix -Ttext-segment configure check.
Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic
what the tools linking script does. At least on s390 the test might fail for
a non-static AC_LINK, while it does work when using those other flags too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13371
2013-04-17 19:11:05 +00:00
Mark Wielaard
bca0cb2aa5 strchr.vgtest mc_replace_strmem.c [r]index and [__GI_]str[r]chr are the same.
Add memcheck/tests/filter_strchr to make it so for the testcase.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13370
2013-04-17 15:23:22 +00:00
Mark Wielaard
1156c98b80 Simplify read_unitinfo_dwarf2. Only try to read the first DIE.
Bug #305513. We should only read the first DIE of a compilation unit.
Each compilation unit header is followed by a single DW_TAG_compile_unit
(or DW_TAG_partial_unit, but those aren't important here) and its children.
There is no reason to read any of the children at this point. If the first
DIE isn't a DW_TAG_compile_unit we are done, none of the child DIEs will
provide any useful information.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13369
2013-04-17 13:48:29 +00:00
Tom Hughes
11234a9407 Pay attention to PT_GNU_STACK when deciding what permissions to
use for the client stack.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13368
2013-04-17 10:08:04 +00:00
Mark Wielaard
7d0adfcedc read_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.
Bug #305513 contained a patch for some extra robustness checks. But
the real cause of crashing in the read_unitinfo_dwarf2 DWARF reader
seemed to have been this issue where DWARF version 2 DWZ partial_units
were read and DW_FORM_ref_addr had an unexpected size. This combination
is rare. DWARF version 4 is the current default version of GCC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13367
2013-04-11 17:55:39 +00:00
Julian Seward
dc1bed081e Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13366
2013-04-11 16:17:45 +00:00
Julian Seward
f1c82a29d7 Add test cases for SDIV and UDIV. Pertains to #314178.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13365
2013-04-11 13:58:48 +00:00
Julian Seward
34113acb36 Add test cases for (T1) LDRT reg+#imm8. See #315689.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13364
2013-04-11 10:58:18 +00:00
Mark Wielaard
b81e3c86b6 Fix double 'the the' in documentation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13363
2013-04-05 13:19:12 +00:00
Philippe Waroquiers
a36350923b temporarily disable memalign part of the undef_malloc_args.c test
as this is breaking Darwin.

A better fix should follow



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13362
2013-04-05 12:53:16 +00:00
Philippe Waroquiers
a819df9d0a Solve false negative for various malloc replaced functions arguments
The replacement functions are running on the simulated CPU.
The code on the simulated CPU does not necessarily use
all arguments. E.g. args can be ignored and/or only given
to a NON SIMD call.
The definedness of such 'unused' arguments will not be verified
by memcheck.
A call to 'trigger_memcheck_error_if_undefined' allows 
memcheck to detect such errors for the otherwise unused args.
Apart of allowing memcheck to detect an error, the function
trigger_memcheck_error_if_undefined has no effect and
has a minimal cost for other tools replacing malloc functions.

(suggestion of the 'no operation check' from Julian).

tested on f12/x86, debian6/amd64, f18/ppc64
Note that some Darwin specific code has been modified
in coregrind/m_replace_malloc/vg_replace_malloc.c.
(Some of) this code has not been compiled (no access to a
Darwin system). The code changed is trivial, so there is
some chance it will compile and even maybe work.

Added a new test verifying that various malloc related
functions undefined args are triggering an error in memcheck.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13361
2013-04-04 21:10:22 +00:00
Petar Jovanovic
5ef5cae5e0 mips: enable helgrind test tc08_hbl2 for mips64
Enable the test for mips64.
Minor improvement in macro INC.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13360
2013-04-04 15:33:27 +00:00
Petar Jovanovic
21b4d03a6d mips: add different value for SOCK_STREAM
MIPS uses different values for socket types.
This is protected by ARCH_HAS_SOCKET_TYPES in Linux kernel and we introduce
it here too. This is important for log-socket feature, and it resolves the
issue reported in https://bugs.kde.org/show_bug.cgi?id=313267#c21.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13359
2013-04-04 10:55:09 +00:00
Petar Jovanovic
4ee8c6feea mips: enable several system call wrappers on mips64
Enable wrappers on mips64 for the following calls:

- dup3
- accept4
- epoll_create1
- timerfd_settime
- newfstatat

Also, allow additional flock64 values in sys_fcntl for mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13358
2013-04-03 23:43:11 +00:00
Petar Jovanovic
1644841498 mips: add mips64le support for atomic_incs and annotate_hbefore tests
Add mips64-le implementation of:

- atomic_add_8bit
- atomic_add_16bit
- atomic_add_32bit
- atomic_add_64bit
- do_acasW

Minor fixes for mips32 implementations are included as well.

These functions are needed to execute atomic_incs and annotate_hbefore
tests on mips64le.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13357
2013-04-03 22:51:23 +00:00
Julian Seward
a5d07d63fb Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13356
2013-04-02 08:24:48 +00:00
Bart Van Assche
ffa9c5fbf3 memcheck, Darwin 10: Add a suppression pattern
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13355
2013-04-01 08:23:32 +00:00
Philippe Waroquiers
5deb4fbc14 announce an old bug (wishlist) which rev 13223 fixed
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13354
2013-03-31 16:20:02 +00:00
Bart Van Assche
1d280b7aac drd, Darwin: Generalize a suppression pattern
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13353
2013-03-31 07:40:53 +00:00
Bart Van Assche
21b57d82cd drd, Darwin: Add a suppression pattern
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13352
2013-03-30 09:38:11 +00:00
Julian Seward
509a6efaa9 Don't assume that page size is 4K when loading PIEs. Fixes #263034.
(Dodji Seketeli, dodji@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13351
2013-03-29 09:57:24 +00:00
Julian Seward
cca00cebc1 Enable prctl on ppc64-linux. Fixes #308089.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13350
2013-03-29 09:40:48 +00:00
Mark Wielaard
0ec8df03c1 For memcheck overlap filter_memcpy str[n]cpy and __GI_str[n]cpy are equal.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13349
2013-03-28 22:52:14 +00:00
Mark Wielaard
684a15246c memcheck/tests/strchr test should not depend on line numbers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13348
2013-03-28 22:52:13 +00:00
Mark Wielaard
cc1ee7885f Add new MISC vector Iops to memcheck/tests/vbit-test/irops.c.
memcheck/tests/vbit-test fails with unknown opcode after introduction
of new Iops for AVX2, BMI, FMA support #317506

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13347
2013-03-28 21:24:57 +00:00
Tom Hughes
b31167235f Cope with old linkers which don't support -Ttext-segment but which do
generate build-id sections. #317091.  (Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13346
2013-03-28 15:53:21 +00:00
Julian Seward
7a5e91776f Be more aggressive about dropping the lock in spinloops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13345
2013-03-28 10:40:53 +00:00
Tom Hughes
a990370cde Update test results for EQ_UQ SSE FP comparison operation. BZ#317444.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13344
2013-03-28 09:35:39 +00:00
Julian Seward
78b3b945b4 Fix BMI assembler configure check and avx2/bmi/fma vgtest prereqs.
#317461.  (Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13343
2013-03-27 21:59:21 +00:00
Tom Hughes
9ada76d11c Test support for the EQ_UQ SSE FP comparison operation. BZ#317444.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13342
2013-03-27 15:39:18 +00:00
Julian Seward
dc0e01ab4d Build system and hwcaps fixes pertaining to #305728, which added
support for AVX2, BMI1, BMI2 and FMA instructions.
(Jakub Jelinek, jakub@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13340
2013-03-27 11:43:20 +00:00
Julian Seward
1c50d16462 Testcase additions pertaining to #305728, which added support for
AVX2, BMI1, BMI2 and FMA instructions.
(Jakub Jelinek, jakub@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13339
2013-03-27 11:42:05 +00:00
Julian Seward
9c91869bc9 Memcheck fixes for new IR ops introduced by r2702 (which added support
for AVX2, BMI1, BMI2 and FMA instructions).  Part of #305728.
(Jakub Jelinek, jakub@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13338
2013-03-27 11:40:02 +00:00
Julian Seward
0ebe62078c Add hwcaps checking on amd64 for RDTSCP. Part of the fix for #251569
and its dups.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13337
2013-03-26 13:57:48 +00:00
Julian Seward
ccf13bd148 Add test cases for SSE4 MOVNTDQA insn. Pertains to #316503.
(Patrick J. LoPresti, lopresti@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13336
2013-03-26 10:29:05 +00:00
Julian Seward
c96c55d600 Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13335
2013-03-26 10:12:02 +00:00
Philippe Waroquiers
6ceb0e1f83 fix 307082 HG false positive: pthread_cond_destroy: destruction of unknown cond var
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13332
2013-03-24 20:10:23 +00:00
Julian Seward
c7f8191472 Use -Wl,-Ttext-segment when static linking if possible to keep build-ids.
Fixes #317091.  (Mark Wielaard, mjw@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13331
2013-03-22 11:49:46 +00:00
Philippe Waroquiers
66bc0e6f56 Undo void change done as part of rev 13329
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13330
2013-03-18 22:51:57 +00:00
Philippe Waroquiers
b5c064dfea Better fix for 295590
(problem reported in bug 307082, comment 8).
Solution applied is similar to what is in 307082 patch
(i.e. do not destroy the internal helgrind var if nWaiters > 0).
But also do not remove it from the FM.

+ add a test case (re-using the drd test case)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13329
2013-03-18 22:48:22 +00:00
Julian Seward
838dae3c46 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13328
2013-03-18 16:05:43 +00:00
Philippe Waroquiers
52b0e470c3 Document that user level client stack switches might cause crashes
and that these crahses might be avoided using VALGRIND_STACK_REGISTER
See bug 316613


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13327
2013-03-13 22:03:31 +00:00
Philippe Waroquiers
30275f300c Fix 316535 Use of |signed int| instead of (unsigned) |size_t| in messages...
* when SEGV trapped, report the main thread size as an unsigned size_t
* Similar for memcheck overlap errors
  For example, for the 2 calls:
     memcpy(&a, &a, 2147483648UL);
     memcpy(&a, &a, -1);  // silently accepted by gcc 4.4.4 -Wall
                          // while the 3rd arg is supposed to be a size_t
  we now obtain (on a 32 bit system)
    Source and destination overlap in memcpy(0xbe97113f, 0xbe97113f, 2147483648)
    Source and destination overlap in memcpy(0xbef6d13f, 0xbef6d13f, 4294967295)
  instead of
    Source and destination overlap in memcpy(0xbe8e012f, 0xbe8e012f, -2147483648)
    Source and destination overlap in memcpy(0xbe8e012f, 0xbe8e012f, -1)

Do not ask me why 
   memcpy(&a, &a, -1);
is supposed to be accepted/acceptable/valid code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13326
2013-03-13 21:44:07 +00:00
Florian Krohm
b6e7089a33 s390: Add testcase for the SRNMT instruction.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13325
2013-03-12 01:32:40 +00:00
Philippe Waroquiers
0e086ed3b1 Fix 316145 - callgrind command line options in manpage reference (unknown) callgrind manual
Patch by Mark Wielaard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13324
2013-03-10 16:29:02 +00:00
Philippe Waroquiers
089210684b fix 315959 valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section
PAtch from Mark Wielaard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13323
2013-03-10 16:20:10 +00:00
Bart Van Assche
a8a84e19e1 drd/tests/annotate_smart_pointer2: Add an expected output file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13322
2013-03-10 13:39:57 +00:00