]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agostrchr.vgtest mc_replace_strmem.c [r]index and [__GI_]str[r]chr are the same.
Mark Wielaard [Wed, 17 Apr 2013 15:23:22 +0000 (15:23 +0000)] 
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

13 years agoSimplify read_unitinfo_dwarf2. Only try to read the first DIE.
Mark Wielaard [Wed, 17 Apr 2013 13:48:29 +0000 (13:48 +0000)] 
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

13 years agoRemove some unused ifdeffery that allowed disabling QC flag updating
Julian Seward [Wed, 17 Apr 2013 11:21:58 +0000 (11:21 +0000)] 
Remove some unused ifdeffery that allowed disabling QC flag updating
for Neon.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2707

13 years agoPay attention to PT_GNU_STACK when deciding what permissions to
Tom Hughes [Wed, 17 Apr 2013 10:08:04 +0000 (10:08 +0000)] 
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

13 years agoread_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.
Mark Wielaard [Thu, 11 Apr 2013 17:55:39 +0000 (17:55 +0000)] 
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

13 years agoUpdate.
Julian Seward [Thu, 11 Apr 2013 16:17:45 +0000 (16:17 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13366

13 years agoAdd test cases for SDIV and UDIV. Pertains to #314178.
Julian Seward [Thu, 11 Apr 2013 13:58:48 +0000 (13:58 +0000)] 
Add test cases for SDIV and UDIV.  Pertains to #314178.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13365

13 years agoImplement ARM SDIV and UDIV instructions. Fixes #314178. Partially
Julian Seward [Thu, 11 Apr 2013 13:57:43 +0000 (13:57 +0000)] 
Implement ARM SDIV and UDIV instructions.  Fixes #314178.  Partially
based on a patch by Ben Cheng, bccheng@android.com.  Also renames two
misnamed PPC helpers.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2706

13 years agoAdd test cases for (T1) LDRT reg+#imm8. See #315689.
Julian Seward [Thu, 11 Apr 2013 10:58:18 +0000 (10:58 +0000)] 
Add test cases for (T1) LDRT reg+#imm8.  See #315689.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13364

13 years agoImplement (T1) LDRT reg+#imm8. Fixes #315689.
Julian Seward [Thu, 11 Apr 2013 10:56:42 +0000 (10:56 +0000)] 
Implement (T1) LDRT reg+#imm8.  Fixes #315689.
(Vasily, w.golubev@mail.ru)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2705

13 years agoFix double 'the the' in documentation.
Mark Wielaard [Fri, 5 Apr 2013 13:19:12 +0000 (13:19 +0000)] 
Fix double 'the the' in documentation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13363

13 years agotemporarily disable memalign part of the undef_malloc_args.c test
Philippe Waroquiers [Fri, 5 Apr 2013 12:53:16 +0000 (12:53 +0000)] 
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

13 years agoSolve false negative for various malloc replaced functions arguments
Philippe Waroquiers [Thu, 4 Apr 2013 21:10:22 +0000 (21:10 +0000)] 
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

13 years agomips: enable helgrind test tc08_hbl2 for mips64
Petar Jovanovic [Thu, 4 Apr 2013 15:33:27 +0000 (15:33 +0000)] 
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

13 years agomips: add different value for SOCK_STREAM
Petar Jovanovic [Thu, 4 Apr 2013 10:55:09 +0000 (10:55 +0000)] 
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

13 years agomips: enable several system call wrappers on mips64
Petar Jovanovic [Wed, 3 Apr 2013 23:43:11 +0000 (23:43 +0000)] 
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

13 years agomips: add mips64le support for atomic_incs and annotate_hbefore tests
Petar Jovanovic [Wed, 3 Apr 2013 22:51:23 +0000 (22:51 +0000)] 
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

13 years agoUpdate bug status.
Julian Seward [Tue, 2 Apr 2013 08:24:48 +0000 (08:24 +0000)] 
Update bug status.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13356

13 years agomemcheck, Darwin 10: Add a suppression pattern
Bart Van Assche [Mon, 1 Apr 2013 08:23:32 +0000 (08:23 +0000)] 
memcheck, Darwin 10: Add a suppression pattern

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13355

13 years agoannounce an old bug (wishlist) which rev 13223 fixed
Philippe Waroquiers [Sun, 31 Mar 2013 16:20:02 +0000 (16:20 +0000)] 
announce an old bug (wishlist) which rev 13223 fixed

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13354

13 years agodrd, Darwin: Generalize a suppression pattern
Bart Van Assche [Sun, 31 Mar 2013 07:40:53 +0000 (07:40 +0000)] 
drd, Darwin: Generalize a suppression pattern

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13353

13 years agodrd, Darwin: Add a suppression pattern
Bart Van Assche [Sat, 30 Mar 2013 09:38:11 +0000 (09:38 +0000)] 
drd, Darwin: Add a suppression pattern

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13352

13 years agoDon't assume that page size is 4K when loading PIEs. Fixes #263034.
Julian Seward [Fri, 29 Mar 2013 09:57:24 +0000 (09:57 +0000)] 
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

13 years agoEnable prctl on ppc64-linux. Fixes #308089.
Julian Seward [Fri, 29 Mar 2013 09:40:48 +0000 (09:40 +0000)] 
Enable prctl on ppc64-linux.  Fixes #308089.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13350

13 years agoFor memcheck overlap filter_memcpy str[n]cpy and __GI_str[n]cpy are equal.
Mark Wielaard [Thu, 28 Mar 2013 22:52:14 +0000 (22:52 +0000)] 
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

13 years agomemcheck/tests/strchr test should not depend on line numbers.
Mark Wielaard [Thu, 28 Mar 2013 22:52:13 +0000 (22:52 +0000)] 
memcheck/tests/strchr test should not depend on line numbers.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13348

13 years agoAdd new MISC vector Iops to memcheck/tests/vbit-test/irops.c.
Mark Wielaard [Thu, 28 Mar 2013 21:24:57 +0000 (21:24 +0000)] 
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

13 years agoCope with old linkers which don't support -Ttext-segment but which do
Tom Hughes [Thu, 28 Mar 2013 15:53:21 +0000 (15:53 +0000)] 
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

13 years agoBe more aggressive about dropping the lock in spinloops.
Julian Seward [Thu, 28 Mar 2013 10:40:53 +0000 (10:40 +0000)] 
Be more aggressive about dropping the lock in spinloops.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13345

13 years agoUpdate test results for EQ_UQ SSE FP comparison operation. BZ#317444.
Tom Hughes [Thu, 28 Mar 2013 09:35:39 +0000 (09:35 +0000)] 
Update test results for EQ_UQ SSE FP comparison operation. BZ#317444.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13344

13 years agoFix some rebasing fallout pertaining to today's AVX2 landing.
Julian Seward [Wed, 27 Mar 2013 22:15:36 +0000 (22:15 +0000)] 
Fix some rebasing fallout pertaining to today's AVX2 landing.
Fixes #317463.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2704

13 years agoFix BMI assembler configure check and avx2/bmi/fma vgtest prereqs.
Julian Seward [Wed, 27 Mar 2013 21:59:21 +0000 (21:59 +0000)] 
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

13 years agoTest support for the EQ_UQ SSE FP comparison operation. BZ#317444.
Tom Hughes [Wed, 27 Mar 2013 15:39:18 +0000 (15:39 +0000)] 
Test support for the EQ_UQ SSE FP comparison operation. BZ#317444.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13342

13 years agoAdd support for the EQ_UQ SSE FP comparison operation. BZ#317444.
Tom Hughes [Wed, 27 Mar 2013 15:38:47 +0000 (15:38 +0000)] 
Add support for the EQ_UQ SSE FP comparison operation. BZ#317444.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2703

13 years agoBuild system and hwcaps fixes pertaining to #305728, which added
Julian Seward [Wed, 27 Mar 2013 11:43:20 +0000 (11:43 +0000)] 
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

13 years agoTestcase additions pertaining to #305728, which added support for
Julian Seward [Wed, 27 Mar 2013 11:42:05 +0000 (11:42 +0000)] 
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

13 years agoMemcheck fixes for new IR ops introduced by r2702 (which added support
Julian Seward [Wed, 27 Mar 2013 11:40:02 +0000 (11:40 +0000)] 
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

13 years agoAMD64: Add support for AVX2, BMI1, BMI2 and FMA instructions (VEX side).
Julian Seward [Wed, 27 Mar 2013 11:37:33 +0000 (11:37 +0000)] 
AMD64: Add support for AVX2, BMI1, BMI2 and FMA instructions (VEX side).
Fixes #305728.  (Jakub Jelinek, jakub@redhat.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2702

13 years agoAdd hwcaps checking on amd64 for RDTSCP. Part of the fix for #251569
Julian Seward [Tue, 26 Mar 2013 13:57:48 +0000 (13:57 +0000)] 
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

13 years agoImplement RDTSCP on amd64, finally. This fixes #251569 and dups
Julian Seward [Tue, 26 Mar 2013 13:53:18 +0000 (13:53 +0000)] 
Implement RDTSCP on amd64, finally.  This fixes #251569 and dups
311933, 313348 and 313354.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2701

13 years agoAdd test cases for SSE4 MOVNTDQA insn. Pertains to #316503.
Julian Seward [Tue, 26 Mar 2013 10:29:05 +0000 (10:29 +0000)] 
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

13 years agoImplement SSE4 MOVNTDQA insn. Fixes #316503.
Julian Seward [Tue, 26 Mar 2013 10:27:39 +0000 (10:27 +0000)] 
Implement SSE4 MOVNTDQA insn.  Fixes #316503.
(Patrick J. LoPresti, lopresti@gmail.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2700

13 years agoUpdate bug status.
Julian Seward [Tue, 26 Mar 2013 10:12:02 +0000 (10:12 +0000)] 
Update bug status.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13335

13 years agofix 307082 HG false positive: pthread_cond_destroy: destruction of unknown cond var
Philippe Waroquiers [Sun, 24 Mar 2013 20:10:23 +0000 (20:10 +0000)] 
fix 307082 HG false positive: pthread_cond_destroy: destruction of unknown cond var

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13332

13 years agoFix an assertion failure on CVT.F64.S32 d16, d16, #1. Fixes #317186 (I think).
Julian Seward [Fri, 22 Mar 2013 13:28:50 +0000 (13:28 +0000)] 
Fix an assertion failure on CVT.F64.S32 d16, d16, #1.  Fixes #317186 (I think).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2698

13 years agoUse -Wl,-Ttext-segment when static linking if possible to keep build-ids.
Julian Seward [Fri, 22 Mar 2013 11:49:46 +0000 (11:49 +0000)] 
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

13 years agoVEX, ppc code cleanup
Carl Love [Wed, 20 Mar 2013 15:51:34 +0000 (15:51 +0000)] 
VEX, ppc code cleanup

This patch removes some dead code left behind when the code was restructured
to fix the implementation changes to make it compliant with the iop
definitions.

The patch makes no functional changes as it is just removing code that is not
reachable.

This patch is for Bugzilla 314269.

Signed-off-by: Carl Love <cel@us.ibm.com>
git-svn-id: svn://svn.valgrind.org/vex/trunk@2697

13 years agoUndo void change done as part of rev 13329
Philippe Waroquiers [Mon, 18 Mar 2013 22:51:57 +0000 (22:51 +0000)] 
Undo void change done as part of rev 13329

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13330

13 years agoBetter fix for 295590
Philippe Waroquiers [Mon, 18 Mar 2013 22:48:22 +0000 (22:48 +0000)] 
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

13 years agoUpdate.
Julian Seward [Mon, 18 Mar 2013 16:05:43 +0000 (16:05 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13328

13 years agoDocument that user level client stack switches might cause crashes
Philippe Waroquiers [Wed, 13 Mar 2013 22:03:31 +0000 (22:03 +0000)] 
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

13 years agoFix 316535 Use of |signed int| instead of (unsigned) |size_t| in messages...
Philippe Waroquiers [Wed, 13 Mar 2013 21:44:07 +0000 (21:44 +0000)] 
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

13 years agos390: Add testcase for the SRNMT instruction.
Florian Krohm [Tue, 12 Mar 2013 01:32:40 +0000 (01:32 +0000)] 
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

13 years agos390: Support the SRNMT instruction.
Florian Krohm [Tue, 12 Mar 2013 01:31:24 +0000 (01:31 +0000)] 
s390: Support the SRNMT instruction.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2696

13 years agoFix 316145 - callgrind command line options in manpage reference (unknown) callgrind...
Philippe Waroquiers [Sun, 10 Mar 2013 16:29:02 +0000 (16:29 +0000)] 
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

13 years agofix 315959 valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section
Philippe Waroquiers [Sun, 10 Mar 2013 16:20:10 +0000 (16:20 +0000)] 
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

13 years agodrd/tests/annotate_smart_pointer2: Add an expected output file
Bart Van Assche [Sun, 10 Mar 2013 13:39:57 +0000 (13:39 +0000)] 
drd/tests/annotate_smart_pointer2: Add an expected output file

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13322

13 years agodrd/tests/sem_wait: Skip on Darwin since sem_init() fails with ENOSYS on Darwin
Bart Van Assche [Sun, 10 Mar 2013 13:38:41 +0000 (13:38 +0000)] 
drd/tests/sem_wait: Skip on Darwin since sem_init() fails with ENOSYS on Darwin

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13321

13 years agoDarwin: Make stack growth tracking consistent with other architectures
Bart Van Assche [Sun, 10 Mar 2013 12:51:15 +0000 (12:51 +0000)] 
Darwin: Make stack growth tracking consistent with other architectures

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13320

13 years agoDarwin: Fix a compiler warning
Bart Van Assche [Sun, 10 Mar 2013 12:49:08 +0000 (12:49 +0000)] 
Darwin: Fix a compiler warning

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13319

13 years agomassif/tests/pages_as_heap.c: Fix a compiler warning
Bart Van Assche [Sun, 10 Mar 2013 12:37:48 +0000 (12:37 +0000)] 
massif/tests/pages_as_heap.c: Fix a compiler warning

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13318

13 years agos390: Distribute dfp-1 expected output files also if built on a non-s390 platform
Bart Van Assche [Sun, 10 Mar 2013 11:30:22 +0000 (11:30 +0000)] 
s390: Distribute dfp-1 expected output files also if built on a non-s390 platform

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13317

13 years agodrd: Fix stack growth tracking. Hopefully this is the proper fix for #297147.
Bart Van Assche [Sun, 10 Mar 2013 11:02:32 +0000 (11:02 +0000)] 
drd: Fix stack growth tracking. Hopefully this is the proper fix for #297147.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13316

13 years agodrd: Fix a 4x slowdown for certain applications (#316181)
Bart Van Assche [Sun, 10 Mar 2013 10:43:11 +0000 (10:43 +0000)] 
drd: Fix a 4x slowdown for certain applications (#316181)

This commit reverts r12629 ("drd: Don't sporadically report false positives on
newly allocated memory. Fixes #297147").

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13315

13 years agoFix 316144 (valgrind.1 manpage contains ??? strings for references)
Philippe Waroquiers [Wed, 6 Mar 2013 22:39:18 +0000 (22:39 +0000)] 
Fix 316144 (valgrind.1 manpage contains ??? strings for references)
Patch by Mark Wielaard.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13314

13 years agoAdd test cases for VCVT.{S,U}32.F64 D[d], D[d], #frac_bits.
Julian Seward [Wed, 6 Mar 2013 08:35:12 +0000 (08:35 +0000)] 
Add test cases for VCVT.{S,U}32.F64 D[d], D[d], #frac_bits.
Pertains to #315738.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13313

13 years agoImplement VCVT.{S,U}32.F64 D[d], D[d], #frac_bits. Fixes #315738.
Julian Seward [Wed, 6 Mar 2013 08:34:04 +0000 (08:34 +0000)] 
Implement VCVT.{S,U}32.F64 D[d], D[d], #frac_bits.  Fixes #315738.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2695

13 years agoAdd test cases for VCVT.F64.{SU}32, #imm, including a bunch of dodging and
Julian Seward [Tue, 5 Mar 2013 14:27:44 +0000 (14:27 +0000)] 
Add test cases for VCVT.F64.{SU}32, #imm, including a bunch of dodging and
weaving to work around buggy assemblers.  Pertains to #308717.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13312

13 years agoImplement VCVT.F64.{SU}32, #imm. Fixes #308717.
Julian Seward [Tue, 5 Mar 2013 14:26:22 +0000 (14:26 +0000)] 
Implement VCVT.F64.{SU}32, #imm.  Fixes #308717.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2694

13 years agoHandle "vmov qDest.I32 V128{0xFFFF}" so to speak, and make the case
Julian Seward [Tue, 5 Mar 2013 10:35:44 +0000 (10:35 +0000)] 
Handle "vmov qDest.I32 V128{0xFFFF}" so to speak, and make the case
for a zero immediate more similar.  Verify assembled output against
GNU as.  Fixes #311318.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2693

13 years agoAdd test cases for SMLAL{BB,BT,TB,TT}. Related to #308718.
Julian Seward [Mon, 4 Mar 2013 18:35:17 +0000 (18:35 +0000)] 
Add test cases for SMLAL{BB,BT,TB,TT}.  Related to #308718.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13311

13 years agoImplement SMLAL{BB,BT,TB,TT}. Fixes #308718. (Mans Rullgard,
Julian Seward [Mon, 4 Mar 2013 18:33:56 +0000 (18:33 +0000)] 
Implement SMLAL{BB,BT,TB,TT}.  Fixes #308718.  (Mans Rullgard,
mans@mansr.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2692

13 years agoFix inconsistency between callgrind and format spec
Josef Weidendorfer [Mon, 4 Mar 2013 17:02:35 +0000 (17:02 +0000)] 
Fix inconsistency between callgrind and format spec

Bug found by, and fix based on a patch by Mark Wielaard

Callgrind format specification was inconsistent with
what Callgrind generates, and what callgrind_annotate
accepted. Now, callgrind_annotate accepts the examples
in the format specification.

* Callgrind writes 'cfi=' lines for when a call target goes
  into another source file. According to the spec, 'cfl=' is
  used for this. Change the spec to allow both, and change
  callgrind_annotate to accept both.
* The spec requires just an "events:" line as minimum header
  to render the file as correct according to the specification.
  callgrind_annotate also expected a 'cmd=' line. Fixed.
* The 'summary:' line is optional in the spec. Fixed in
  callgrind_annotate. If not provided, summary is calculated
  from all cost lines.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13310

13 years agoMoved fixed bugs to the NEWS file.
Julian Seward [Mon, 4 Mar 2013 11:27:25 +0000 (11:27 +0000)] 
Moved fixed bugs to the NEWS file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13309

13 years agoEven more first-pass triage.
Julian Seward [Mon, 4 Mar 2013 10:41:18 +0000 (10:41 +0000)] 
Even more first-pass triage.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13308

13 years agoEven more first-pass triagery.
Julian Seward [Sun, 3 Mar 2013 22:10:02 +0000 (22:10 +0000)] 
Even more first-pass triagery.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13307

13 years agoBetter document an ignored return value.
Philippe Waroquiers [Sun, 3 Mar 2013 17:52:31 +0000 (17:52 +0000)] 
Better document an ignored return value.
The call to VG_(gdbserver_report_signal) is ignored
in synth_fault_common (m_signals.c) as these signals
are always to be delivered (as explained by the following
comment).
=> better document that the return value is ignored on purpose.
(spotted by Florian, using Coverity)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13306

13 years agoannounce fix for 309823 Generate errors for still reachable blocks
Philippe Waroquiers [Sun, 3 Mar 2013 13:23:58 +0000 (13:23 +0000)] 
announce fix for 309823 Generate errors for still reachable blocks
Functionality is provided via the new 3.9.0 arg
    --errors-for-leak-kinds=kind1,kind2,..  which leak kinds are errors?
                                            [definite,possible]
        where kind is one of definite indirect possible reachable all none

that was committed in rev 13170.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13305

13 years agoImplement the name_to_handle_at system call for x86 and amd64.
Tom Hughes [Sun, 3 Mar 2013 12:57:20 +0000 (12:57 +0000)] 
Implement the name_to_handle_at system call for x86 and amd64.
Based on patch from Asmadeus to fix BZ#308930.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13304

13 years agos390: Fix disassembly. Wrong argument order was causing asserts.
Florian Krohm [Sun, 3 Mar 2013 03:21:57 +0000 (03:21 +0000)] 
s390: Fix disassembly. Wrong argument order was causing asserts.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2691

13 years agoRemove dead code (a Coverity finding).
Florian Krohm [Sat, 2 Mar 2013 20:46:08 +0000 (20:46 +0000)] 
Remove dead code (a Coverity finding).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2690

13 years agoAvoid warning that format argument is not a string literal
Philippe Waroquiers [Sat, 2 Mar 2013 15:44:03 +0000 (15:44 +0000)] 
Avoid warning that format argument is not a string literal

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13303

13 years agomips: fix for some warnings in mips files when compiling on amd64/x86
Petar Jovanovic [Sat, 2 Mar 2013 02:37:01 +0000 (02:37 +0000)] 
mips: fix for some warnings in mips files when compiling on amd64/x86

Fixing some constant size related warnings in mips files on gcc20(amd64).
Thanks Philippe for reporting it.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2689

13 years agoFactorise some code from syswrap-amd64/arm/mips32/mips64-linux.c to syswrap-linux.c
Philippe Waroquiers [Fri, 1 Mar 2013 23:31:09 +0000 (23:31 +0000)] 
Factorise some code from syswrap-amd64/arm/mips32/mips64-linux.c to syswrap-linux.c

Almost mechanical transformation, removes > 1000 SLOC.

Compiled and regtested on amd64/x86/mips32
Compiled and (somewhat) tested on mips64
Compiled on arm

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13302

13 years agosmall changes in sendmsg.c regtest
Philippe Waroquiers [Fri, 1 Mar 2013 23:05:43 +0000 (23:05 +0000)] 
small changes in sendmsg.c regtest
* avoid a warning related to pointer types
* replace exit (0) by return 0 (might help backtraces on Darwin, suggestion by Rich Coe)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13301

13 years agoHandle WFE and SEV, needed for spinlock hinting.
Julian Seward [Fri, 1 Mar 2013 21:13:24 +0000 (21:13 +0000)] 
Handle WFE and SEV, needed for spinlock hinting.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2688

13 years agoallow compile time tracing to be enabled using the stats counters
Philippe Waroquiers [Fri, 1 Mar 2013 20:37:41 +0000 (20:37 +0000)] 
allow compile time tracing to be enabled using the stats counters
(so put first the static stats counters).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13300

13 years agoAnnounce 296311 was fixed Wrong stack traces due to -fomit-frame-pointer (x86)
Philippe Waroquiers [Fri, 1 Mar 2013 19:07:29 +0000 (19:07 +0000)] 
Announce 296311 was fixed Wrong stack traces due to -fomit-frame-pointer (x86)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13299

13 years agowire up 2 vhost ioctls. The kernel does not use any parameter
Christian Borntraeger [Fri, 1 Mar 2013 13:17:49 +0000 (13:17 +0000)] 
wire up 2 vhost ioctls. The kernel does not use any parameter

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13298

13 years agoinitial tun/tap ioctls.
Christian Borntraeger [Fri, 1 Mar 2013 12:56:07 +0000 (12:56 +0000)] 
initial tun/tap ioctls.
TUNSETIFF/TUNGETIFF/TUNSETOFFLOAD. See 315952.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13297

13 years agoDo some more triagery.
Julian Seward [Fri, 1 Mar 2013 12:10:33 +0000 (12:10 +0000)] 
Do some more triagery.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13296

13 years agoDo some triagery.
Julian Seward [Fri, 1 Mar 2013 09:20:32 +0000 (09:20 +0000)] 
Do some triagery.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13295

13 years agoDon't check the flags word in msghdr for sendmsg as the
Tom Hughes [Thu, 28 Feb 2013 12:50:55 +0000 (12:50 +0000)] 
Don't check the flags word in msghdr for sendmsg as the
kernel will neither read nor write it.

Patch from Mark Wielaard to fix BZ#315441.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13294

13 years agoUpdate bug list.
Julian Seward [Thu, 28 Feb 2013 09:03:21 +0000 (09:03 +0000)] 
Update bug list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13293

13 years agomips: adding MIPS64LE support to Valgrind
Petar Jovanovic [Wed, 27 Feb 2013 23:17:33 +0000 (23:17 +0000)] 
mips: adding MIPS64LE support to Valgrind

Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292

13 years agomips: adding MIPS64LE support to VEX
Petar Jovanovic [Wed, 27 Feb 2013 22:57:17 +0000 (22:57 +0000)] 
mips: adding MIPS64LE support to VEX

Necessary changes to VEX to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267

git-svn-id: svn://svn.valgrind.org/vex/trunk@2687

13 years agoFix vassert_fail producing random output for an empty format
Philippe Waroquiers [Tue, 26 Feb 2013 21:54:28 +0000 (21:54 +0000)] 
Fix vassert_fail producing random output for an empty format
vsnprintf does not do any addition to the buffer for an empty
format. So, buf was not null terminated.
This e.g. causes an assert_fail to output random characters
after the failed expression.
Fix by ensuring the buffer of vsnprintf is always null terminated
to start with.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13291

13 years agofix 315545 (find_TTEntry_from_hcode): Assertion '(UChar*)sec->tt[tteNo].tcptr <=...
Philippe Waroquiers [Sun, 24 Feb 2013 23:16:58 +0000 (23:16 +0000)] 
fix 315545 (find_TTEntry_from_hcode): Assertion '(UChar*)sec->tt[tteNo].tcptr <= (UChar*)hcode' failed

Assertion
  valgrind: m_transtab.c:674 (find_TTEntry_from_hcode):
  Assertion '(UChar*)sec->tt[tteNo].tcptr <= (UChar*)hcode' failed.
failure (encountered on some platforms while running gdbsrv tests).

The problem is related to invalidated entries and the host_extents
mapping between hostcode and the translation table entry.

The problem: when an entry is invalidated, the translation table
entry is changed to status Deleted. However, the host extent array
element is not cleaned up.
If a search for a host code address (find_TTEntry_from_hcode)
finds this entry, the translation table entry in Deleted status
is considered as a 'not found', which ensures that the invalidated
entry is not used (e.g. for chaining).
This is all ok.

However, it might be that this Deleted entry is re-used
(see function VG_(add_to_transtab), searching for a Empty
or Deleted entry.
If the Deleted entry is re-used, then a search for the
dead host code can give a result pointing to the re-used
entry. That is clearly wrong.
Note that it is unclear if this bug can only be triggered
while using gdbsrv or if this bug can be triggered with
just the "normal" invalidation logic of translation.
gdbsrv being a heavy "user" of invalidation, it might
be it helps to trigger the code. Alternatively, as gdbsrv
invalidation is special (e.g. invalidation of some entries
is done during translation of other entries), it might be
the bug is specific to gdbsrv.

In any case, to avoid the bug:
searching for an host code address must not only
ignore Deleted entries, but must also ignore an entry
found via a host_extent element which is for a Deleted
entry that was re-used afterwards (pointed to by a
newer host_extent element).

Multiple solutions are possible for fixing the bug:
Sol1: cleanup the host_extents array when an entry is deleted.
  The cleanup is however deemed costly:
  Each invalidate operation must do a search in the host_extents.
  The host_extents array must then be "compacted" to remove
  the "dead" host extent element from the array.
  The compact operation can be avoided if instead of removing
  the element, one marks instead the element as "dead"
  e.g. by using one bit of UInt len for that:
     UInt len : 31;
     Bool dead : 1;
  This avoids the compact, but still incurrs the cost of
  search and modify the host_extent for each entry invalidated.
  Invalidating entries seems to be a critical operation
  (e.g. specific ECLASS related  data structures have been
   done to allow fast deletion).
  => it is deemed that a solution not incurring cost during
  invaliation is preferrable.

* Sol 2: detect in find_TTEntry_from_hcode
  that the host_extent element is re-used, and handle it similarly
  to an host_extents which points at a Deleted entry.
  This detection is possible as if an entry is re-used after
  having been deleted, this implies that its host code will be
  after the end of the host code of the deleted entry
  (as host code of a sector is not re-used).
  The attached patch implements this solution.

* Sol 3: avoid re-using an entry : the entry would then stay
  in Deleted state. This is deemed not ok as it would
  imply that invalidation of entries will cause a sector to
  become full faster.

The patch:
* adds a new function
  Bool HostExtent__is_dead (const HostExtent* hx, const Sector* sec)
  telling if the host extent hx from sector sec is a dead entry.
* this function is used in find_TTEntry_from_hcode so that
  dead host extents are not resulting in host code to be found.
* adds a regression test which caused the assert failure before
  (bug was found/reported/isolated in a small test case by Dejan Jevtic).
* To check the logic of HostExtent__is_dead, m_transtab.c sanity check is
  completed to verify that the nr of entries in use in a sector is equal
  to the nr of non dead entries in the host extent array.
* adds/improves traces in m_transtab.c (enabled at compile
  time using #define DEBUG_TRANSTAB).
  Some already existing 'if (0)' conditions are replaced
  by if (DEBUG_TRANSTAB)

Regression tested on
   f12/x86
   debian6/amd64 (also with export EXTRA_REGTEST_OPTS=--sanity-level=4)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13290

13 years agos390: Non-functional change. Pedant at work...
Florian Krohm [Fri, 22 Feb 2013 03:40:22 +0000 (03:40 +0000)] 
s390: Non-functional change. Pedant at work...

git-svn-id: svn://svn.valgrind.org/vex/trunk@2686

13 years agoMake msgrcv wrappers on amd64, arm and mips32 look for IPC_NOWAIT in
Tom Hughes [Thu, 21 Feb 2013 10:57:23 +0000 (10:57 +0000)] 
Make msgrcv wrappers on amd64, arm and mips32 look for IPC_NOWAIT in
the flags argument, not the type argument. Fixes #315534.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13289