]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoHide .version directives in assembly code on Mac, since XCode doesn't
Julian Seward [Sun, 12 Oct 2014 17:02:55 +0000 (17:02 +0000)] 
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

11 years agoFix the thread-name facility and associated test on Darwin.
Julian Seward [Sun, 12 Oct 2014 13:47:30 +0000 (13:47 +0000)] 
Fix the thread-name facility and associated test on Darwin.
Patch from Rhys Kidd (rhyskidd@gmail.com).  Fixes #339442.

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

11 years agoBug 339858 arm64 dmb sy not implemented NEWS entry.
Mark Wielaard [Sat, 11 Oct 2014 19:13:49 +0000 (19:13 +0000)] 
Bug 339858 arm64 dmb sy not implemented NEWS entry.

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

11 years agoBug 339858 arm64 recognize dmb sy. Data Memory Barrier full SYstem variant.
Mark Wielaard [Sat, 11 Oct 2014 19:13:35 +0000 (19:13 +0000)] 
Bug 339858 arm64 recognize dmb sy. Data Memory Barrier full SYstem variant.

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

11 years agoUpdate.
Julian Seward [Sat, 11 Oct 2014 15:47:12 +0000 (15:47 +0000)] 
Update.

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

11 years agoChange eq_Invar to handle all kinds of InVars.
Florian Krohm [Sat, 11 Oct 2014 15:01:21 +0000 (15:01 +0000)] 
Change eq_Invar to handle all kinds of InVars.
Move an assert to a better spot.

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

11 years agoMerge the memory allocation bits from libvex.h into main_util.c.
Florian Krohm [Sat, 11 Oct 2014 14:48:38 +0000 (14:48 +0000)] 
Merge the memory allocation bits from libvex.h into main_util.c.
This is to avoid linkage problems due to unresolved symbols for
some compilers. See also valgrind r14600 and BZ #339542.

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

11 years agoHandle (by ignoring) Imbe_CancelReservation. Detected by Florian
Julian Seward [Sat, 11 Oct 2014 13:54:52 +0000 (13:54 +0000)] 
Handle (by ignoring) Imbe_CancelReservation.  Detected by Florian
Krohm when compiling with -Wswitch-enum.

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

11 years agoBug 339855 arm64 unhandled getsid/setsid syscalls.
Mark Wielaard [Fri, 10 Oct 2014 21:33:39 +0000 (21:33 +0000)] 
Bug 339855 arm64 unhandled getsid/setsid syscalls.

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

11 years agoBug 339853 arm64 times syscall unknown.
Mark Wielaard [Fri, 10 Oct 2014 21:13:28 +0000 (21:13 +0000)] 
Bug 339853 arm64 times syscall unknown.

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

11 years agoThis patch makes the needed changes to the lxvw4x for Little Endian.
Carl Love [Thu, 9 Oct 2014 21:08:25 +0000 (21:08 +0000)] 
This patch makes the needed changes to the lxvw4x for Little Endian.
The data was being loaded in the Big Endian data order for most
cases.  The code in host_ppc_isel.c was changed to do a right
shift and to permute the hi and lo registers in the other order
to ensure the data was always loaded in BE order.  The lxvw4x
emulation in guest_ppc_toIR.c was changed to permute the data from
the BE order to LE order when running on an LE system.

bugzilla 339433

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

11 years agoForgotten mergeinfo update.
Florian Krohm [Thu, 9 Oct 2014 19:28:30 +0000 (19:28 +0000)] 
Forgotten mergeinfo update.

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

11 years agoMerge revisions 14213 and 14612 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 9 Oct 2014 19:22:44 +0000 (19:22 +0000)] 
Merge revisions 14213 and 14612 from the BUF_REMOVAL branch to trunk.
The change removes the PATH_MAX limitation from the linux launcher.

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

11 years agoUse __typeof__.
Florian Krohm [Thu, 9 Oct 2014 16:44:30 +0000 (16:44 +0000)] 
Use __typeof__.

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

11 years agomips: add a missing break
Petar Jovanovic [Thu, 9 Oct 2014 01:19:34 +0000 (01:19 +0000)] 
mips: add a missing break

Add a missing break found by IBM's BEAM checker and reported by Florian.

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

11 years agomips: use putDReg/getDReg for ceil.l.d
Petar Jovanovic [Thu, 9 Oct 2014 01:01:57 +0000 (01:01 +0000)] 
mips: use putDReg/getDReg for ceil.l.d

For better clarity and consistency, use putDReg/getDReg instead of
putFReg/getFReg for ceil.l.d.
Non-functional change.

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

11 years agoConstification part 5.
Florian Krohm [Wed, 8 Oct 2014 08:54:44 +0000 (08:54 +0000)] 
Constification part 5.
Constify ppXXXInstr, getRegUsage_XXXInstr, isMove_XXXInstr, emit_XXXInstr,
and iselSB_XXX.

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

11 years agoUse __typeof__ to improve readability and future maintainability.
Florian Krohm [Tue, 7 Oct 2014 22:13:47 +0000 (22:13 +0000)] 
Use __typeof__ to improve readability and future maintainability.

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

11 years agoRemove unused prototype. Add a fixs390.
Florian Krohm [Tue, 7 Oct 2014 21:57:05 +0000 (21:57 +0000)] 
Remove unused prototype.  Add a fixs390.

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

11 years agoAdd two gnu extensions DW_AT definition and tracing
Philippe Waroquiers [Tue, 7 Oct 2014 21:25:36 +0000 (21:25 +0000)] 
Add two gnu extensions DW_AT definition and tracing

(no functional changes, except that these values will be visible
in the dwarf trace, instead of DW_AT_???)

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

11 years agofollow up to fix for 339721 assertion 'check_sibling == sibling' failed in readdwarf3...
Philippe Waroquiers [Tue, 7 Oct 2014 20:35:06 +0000 (20:35 +0000)] 
follow up to fix for 339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...

The fix committed in revision 14603 is properly fixing the bug 339721.
However, when enabling the dwarf tracing, the DW_FORM_ref_sig8 causes
a segmentation violation, as the tracing code is shared with the
reading code. But the DW_FORM_ref_sig8 reading code is dereferencing
some data structure that is only initialised when --read-var-info=yes.

So, in case DW_FORM_ref_sig8 form reading is done and --read-var-info=no,
then check that we are tracing, and avoid dereferencing the (not initialised)
signature hash table.

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

11 years agoMerge revisions 14372 and 14607 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 7 Oct 2014 18:36:28 +0000 (18:36 +0000)] 
Merge revisions 14372 and 14607 from the BUF_REMOVAL branch to trunk.
This change makes VG_(clo_suppressions), VG_(clo_fullpath_after),
and VG_(clo_req_tsyms) XArrays. They used to be arrays of fixed size.

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

11 years agoThis commit just makes white space changes to the three files in commit
Carl Love [Tue, 7 Oct 2014 18:20:39 +0000 (18:20 +0000)] 
This commit just makes white space changes to the three files in commit
r2966 so I can fix the commit message for that commit.  The previous
commit message was "msg".  The "msg" was the file with the commit message below.

The first attempt to fix the false positive message "Invalid read of size"
was to change to a V128 read instead of four 32-bit reads.  Unfortunately,
this caused some regression test failures that were not caught before
committing the change.

This patch implements the V128 read without creating any regression failures.
The issue with the previous fix is that the lvx instruction was used to
do the V128 fetch.  Unfortunately, that instruction takes the effective
address masks it to make it 16 byte aligned and then does the fetch.  So,
non-aligned fetches do not work correctly.  The fix in this patch does
two aligned fetches with the lvx instruction, calculates a how to permute
the data from the two loads and then permutes the data so the result in the
vector register is the correct value for an unaligned fetch.

The fix is for bugzilla 339433.

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

11 years agoUpdate mergeinfo. r14606 wasn't a proper svn merge. It was just an
Florian Krohm [Tue, 7 Oct 2014 17:58:42 +0000 (17:58 +0000)] 
Update mergeinfo. r14606 wasn't a proper svn merge. It was just an
applied patch.

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

11 years agomsg
Carl Love [Tue, 7 Oct 2014 17:49:14 +0000 (17:49 +0000)] 
msg

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

11 years agoMerge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 7 Oct 2014 14:28:52 +0000 (14:28 +0000)] 
Merge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
The change eliminates the fixed size buffers in gen_suppression and
show_used_suppressions. This is achieved by changing the return type from
VG_TDICT_CALL(tool_get_extra_suppression_info and
VG_TDICT_CALL(tool_print_extra_suppression_use from Bool to SizeT.
A return value of 0 indicates that nothing (except the terminating '\0'
which is always inserted) was written to the buffer. This corresponds to the
previous False return value. A return value which is equal to the buffer
size (that was passed in as function argument) indicates that the buffer was
not large enough. The caller then resizes the buffer and retries.
Otherwise, the buffer was large enough.
Regtested with a resize value of 1.

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

11 years agoIndicate the fix for 339721 is only partial
Philippe Waroquiers [Mon, 6 Oct 2014 21:55:00 +0000 (21:55 +0000)] 
Indicate the fix for 339721 is only partial

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

11 years agofix 339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
Philippe Waroquiers [Mon, 6 Oct 2014 21:46:43 +0000 (21:46 +0000)] 
fix 339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...

The skip code was wrongly skipping 16 bytes, while only 8 are read
for a DW_FORM_ref_sig8.

Note that the problem is made visible by an assert when using
--trace-symtab=yes but in fact this is a real bug in the dwarf reader,
that was introduced in one of the optimisations done for the inline info.

It can manifest itself with other symptoms:

One of the 2 following assertions can fail:
   vg_assert (check_sibling == sibling);
   vg_assert (get_position_of_Cursor (&check_skip)
              == get_position_of_Cursor (&c));

Or the following error can be given:
--29973-- WARNING: Serious error when reading debug info
--29973-- When reading debug info from /home/philippe/valgrind/trunk_untouched/memcheck/tests/dw4:
--29973-- Overrun whilst reading .debug_info section

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

11 years agoFollowup to r14600. Copy the contents of pub_core_guest.h to pub_tool_guest.h
Florian Krohm [Mon, 6 Oct 2014 21:04:14 +0000 (21:04 +0000)] 
Followup to r14600. Copy the contents of pub_core_guest.h to pub_tool_guest.h
to make it available to tools. This allows to remove quite a bit of
ifdeffery from memcheck's mc_machine.c

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

11 years agoEntangle header files a bit. Specifically, pub_core_basics.h no longer
Florian Krohm [Mon, 6 Oct 2014 16:41:14 +0000 (16:41 +0000)] 
Entangle header files a bit. Specifically, pub_core_basics.h no longer
includes libvex.h. It isn't needed to successfully compile pub_core_basics.h
standalone and the declarations libvex.h provides aren't used as broadly as
the comment in the code implied.
Move the guest-specific includes and some ifdeffery to the new file
pub_core_guest.h
For the curious reader: The change above avoids a problem when linking the
linux-launcher which previously included libvex.h indirectly. libvex.h also
defines the inline function LibVEX_Alloc which, when emitted, causes the
link step to fail due to unresoled references (as the launcher does not link
against libvex.a). See also BZ #339542.

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

11 years agoUse correct tag names in sys_getdents/64 wrappers.
Florian Krohm [Sat, 4 Oct 2014 21:32:06 +0000 (21:32 +0000)] 
Use correct tag names in sys_getdents/64 wrappers.
Patch by Ivo Raisr (ivosh@ivosh.net).
Fixes BZ #339645

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

11 years agoThe XArray element type of variable "described" is HChar not UChar.
Florian Krohm [Sat, 4 Oct 2014 21:08:42 +0000 (21:08 +0000)] 
The XArray element type of variable "described" is HChar not UChar.

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

11 years agoguest_amd64_spechelper: fill in a number of missing cases for
Julian Seward [Thu, 2 Oct 2014 16:15:30 +0000 (16:15 +0000)] 
guest_amd64_spechelper: fill in a number of missing cases for
conditions after SUBQ/SUBL/SUBW.  Also, add cases for
Overflow-after-ADDL/SUBL for the benefit of code generated by
Javascript JITs.

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

11 years agoAdd folding rules for: Sar64(x,0) and Sar32(x,0). Immediate
Julian Seward [Thu, 2 Oct 2014 16:13:20 +0000 (16:13 +0000)] 
Add folding rules for: Sar64(x,0) and Sar32(x,0).  Immediate
shifts by zero seem to have a surprisingly large perf hit on
Intels, possibly due to the bizarre eflags/rflags semantics
involved.

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

11 years agoguest_amd64_spechelper: number (in comments) and reorder the spec
Julian Seward [Thu, 2 Oct 2014 11:32:39 +0000 (11:32 +0000)] 
guest_amd64_spechelper: number (in comments) and reorder the spec
cases for arbitrary-condition-after-sub32/sub64.  This makes it easier
to see which cases are missing.  No functional change.

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

11 years agoMerge revisions 14337, 14596 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Wed, 1 Oct 2014 14:16:05 +0000 (14:16 +0000)] 
Merge revisions 14337, 14596 from the BUF_REMOVAL branch to trunk.
Change callgrind's init_cmdbuf function to allocate a large enough
buffer for the command line.

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

11 years agoMerge six easy pieces from the BUF_REMOVAL branch:
Florian Krohm [Tue, 30 Sep 2014 22:15:05 +0000 (22:15 +0000)] 
Merge six easy pieces from the BUF_REMOVAL branch:
r14271  Audit a few buffer sizes, increase one.
r14280  Audit buffer size.
r14296  Remove a few unneeded header files.
r14310  Replace fixed size buffers with a large enough buffers.
r14338  Remove a dead assignment in print_bbcs and make global variable
        print_fd a local variable.
r14359  Remove a benign macro redefinition in cachegrind.

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

11 years agoMerge revisions 14216,14591,14593 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 30 Sep 2014 19:26:58 +0000 (19:26 +0000)] 
Merge revisions 14216,14591,14593 from the BUF_REMOVAL branch to trunk.
Chang the semantics of VG_(getgroups) to support querying the number
of supplementary group IDs which simplifies obtaining them and gets
rid of fixed size buffers.

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

11 years agoUpdate.
Julian Seward [Tue, 30 Sep 2014 12:48:02 +0000 (12:48 +0000)] 
Update.

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

11 years agoAdd entry to NEWS file for fixed bugzilla 339433
Carl Love [Mon, 29 Sep 2014 19:41:11 +0000 (19:41 +0000)] 
Add entry to NEWS file for fixed bugzilla 339433

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

11 years agoppc64: lxvw4x instruction uses four 32-byte loads. When run on an
Carl Love [Mon, 29 Sep 2014 19:33:00 +0000 (19:33 +0000)] 
ppc64:  lxvw4x instruction uses four 32-byte loads.  When run on an
application that does partial loads an error message is generated by
valgrind about Invalid read of size 4.  Valgrind is incorrectly
detecting the invalid read.  The four loads were replaced
by a single 128-bit load.  The invalid read message can now be
suppressed using the command line option " --partial-loads-ok=yes ".

This fix is for Valgrind bugzilla 339433.

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

11 years agoAdd entry to NEWS file for fixed bugzilla 339182
Carl Love [Mon, 29 Sep 2014 18:28:33 +0000 (18:28 +0000)] 
Add entry to NEWS file for fixed bugzilla 339182

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

11 years agoMerge r14125 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 21:35:07 +0000 (21:35 +0000)] 
Merge r14125 from the BUF_REMOVAL branch to trunk.
This change eliminates the fixed size buffer in VG_(assert_fail).

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

11 years agoMerge revisions 14212 and 14586 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 21:22:26 +0000 (21:22 +0000)] 
Merge revisions 14212 and 14586 from the BUF_REMOVAL branch to trunk.
The change eliminates the use of fixed size buffers for path names.
There was a comment in the code that dynamic memory allocation could
not be used. But that is no longer true.
Clean up #includes.

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

11 years agodrd/tests/std_thread2.supp: Add a suppression pattern
Bart Van Assche [Sun, 28 Sep 2014 18:28:18 +0000 (18:28 +0000)] 
drd/tests/std_thread2.supp: Add a suppression pattern

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

11 years agoFix VG_(snprintf) missing arg in inner setup
Philippe Waroquiers [Sun, 28 Sep 2014 16:13:09 +0000 (16:13 +0000)] 
Fix VG_(snprintf) missing arg in inner setup

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

11 years agoMerge r14229 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 13:29:06 +0000 (13:29 +0000)] 
Merge r14229 from the BUF_REMOVAL branch to trunk.
Function MC_(snprintf_delta) requires a buffer of size 31 or larger to
avoid overflow.Add an assert, change and document the buffer size and
fix all call sites. Remove magic constants along the way.

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

11 years agoMerge r14251 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 09:08:59 +0000 (09:08 +0000)] 
Merge r14251 from BUF_REMOVAL branch to trunk.
This change eliminates the fixed size buffer when reading /proc/version.

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

11 years agoMerge r14209 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 27 Sep 2014 18:47:07 +0000 (18:47 +0000)] 
Merge r14209 from BUF_REMOVAL branch to trunk.
In VG_(redir_notify_new_DebugInfo) use a large enough buffer
allocated on the stack.

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

11 years agoMerge r14208 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 27 Sep 2014 18:01:19 +0000 (18:01 +0000)] 
Merge r14208 from BUF_REMOVAL branch to trunk.
In function read_dot_valgrindrc use a large enough buffer
allocated on the stack.
Also assert that the passed in directory is not NULL. This is
true at all call sites. The old code would have attempted to read
/.valgrindrc for dir == NULL and I don't think we want that.

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

11 years agoMerge 14206,14207,14261,14577,14578 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 27 Sep 2014 17:42:07 +0000 (17:42 +0000)] 
Merge 14206,14207,14261,14577,14578 from BUF_REMOVAL branch to trunk.
This changes VG_(record_startup_wd) to dynamically allocate a large
enough buffer for the directory name. As the dynamic memory manager has
started up a while ago, this is quite safe. Also rewrite VG_(get_startup_wd)
to simply return the directory name. No more messing with copying it
around. Adapt call sites.

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

11 years agoMerge revisions 14203,14574,14575 from the BUF_REMOVAL
Florian Krohm [Sat, 27 Sep 2014 13:29:09 +0000 (13:29 +0000)] 
Merge revisions 14203,14574,14575 from the BUF_REMOVAL
branch to trunk.
This change eliminates the fixed size buffers in VG_(basename)
and VG_(dirname).

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

11 years agoRemove unneeded header file which does not exist on Darwin.
Florian Krohm [Sat, 27 Sep 2014 11:36:08 +0000 (11:36 +0000)] 
Remove unneeded header file which does not exist on Darwin.
Disable test for darwin as pthread_setname_np is not implemented.
But setting and observing the threadname is what this test is all about.

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

11 years agomips64: enable soft-float build of the tests
Petar Jovanovic [Sat, 27 Sep 2014 05:40:33 +0000 (05:40 +0000)] 
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

11 years agomips64: run FPU tests only when FPU is available
Petar Jovanovic [Sat, 27 Sep 2014 05:33:07 +0000 (05:33 +0000)] 
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

11 years agomips: extend mips_features with a check for FPU
Petar Jovanovic [Sat, 27 Sep 2014 05:18:21 +0000 (05:18 +0000)] 
mips: extend mips_features with a check for FPU

Extend mips_features with "hard-float" query to which mips_features will
respond whether or not the platform is meant to have a floating point unit.
The query is not a runtime check, but a built-time check.

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

11 years agoimplement KVM_KVMCLOCK_CTRL. Interestingly, the kernel does not check
Christian Borntraeger [Fri, 26 Sep 2014 18:44:40 +0000 (18:44 +0000)] 
implement KVM_KVMCLOCK_CTRL. Interestingly, the kernel does not check
the parameter. QEMU does pass 0 nevertheless as parameter.

bugzilla:  [Bug 339424] Full support of KVM ioctl

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

11 years agoprovide ioctl handlers for KVM_SET_TSS_ADDR.
Christian Borntraeger [Fri, 26 Sep 2014 12:25:02 +0000 (12:25 +0000)] 
provide ioctl handlers for KVM_SET_TSS_ADDR.
part of bugzilla 339424

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

11 years agoRemove unneeded variable.
Florian Krohm [Thu, 25 Sep 2014 20:33:50 +0000 (20:33 +0000)] 
Remove unneeded variable.

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

11 years agoThe function mk_AvDuplicateRI() stores 16 bytes to memory and then
Carl Love [Thu, 25 Sep 2014 15:57:31 +0000 (15:57 +0000)] 
The function mk_AvDuplicateRI() stores 16 bytes to memory and then
fetches the data into a vector register.  The load was being
generated as a lvewx instead of a lvx instruction by the code:

      /* Effectively splat the r_src value to dst */
      addInstr(env, PPCInstr_AvLdSt( True/*ld*/, 4, dst, am_offset_zero ) );

The second argument controls which load instruction is generated.  The
second argument should have been 16 to generate the lvx instruction not
the lvewx instruction.  The issue was reported on the Freescale processor
for the vsptlb instruction.  The issue was not detected before because
the backend code generation used the same vector register to load into
as was used previously to create the data.  However, the code generation
is dependent on the HW/Distro/compiler.  If the same register isn't used
the bug appears.  The issue was found with Valgrind 3.10.0 on the Freescale
processor as the Valgrind code generation didn't happen to pick the same
register to do the load into.

The issue was reported in bugzilla 339182.

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

11 years agoThe testbuckets none/tests/ppc{32,64} did not build in case the
Florian Krohm [Wed, 24 Sep 2014 22:02:54 +0000 (22:02 +0000)] 
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

11 years agoGlibc versions prior to 2.5 do not define PTRACE_GETSIGINFO
Florian Krohm [Wed, 24 Sep 2014 19:13:01 +0000 (19:13 +0000)] 
Glibc versions prior to 2.5 do not define PTRACE_GETSIGINFO
(determined by Patrick J. LoPresti).
Tweak the ifdeffery.

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

11 years agoConstification part 4.
Florian Krohm [Wed, 24 Sep 2014 15:18:09 +0000 (15:18 +0000)] 
Constification part 4.
Constify pointer typed members of VexTanslateArgs.
Fix ripple.

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

11 years agoRipple from constifying parameters of instrumentation functions and
Florian Krohm [Wed, 24 Sep 2014 12:06:55 +0000 (12:06 +0000)] 
Ripple from constifying parameters of instrumentation functions and
callbacks from VexTranslateArgs. See VEX r2958.

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

11 years agoConstification part 3.
Florian Krohm [Wed, 24 Sep 2014 12:00:49 +0000 (12:00 +0000)] 
Constification part 3.
Constify parameters of instrumentation functions and callbacks from
VexTranslateArgs.

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

11 years agoThe PPC64 store quad instruction is updating the address register with the
Carl Love [Tue, 23 Sep 2014 16:22:36 +0000 (16:22 +0000)] 
The PPC64 store quad instruction is updating the address register with the
effective address of the store.  The instruction should not update the
address register.  The issue is due to the two putIReg() calls at the end of
the instruction.  The two putIReg() calls were removed to fix the bug.

This issue was reported in bugzilla 339336.

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

11 years agoConstification part 2.
Florian Krohm [Mon, 22 Sep 2014 21:43:37 +0000 (21:43 +0000)] 
Constification part 2.
Constify parameters of the LibVEX_Chain/Unchain/PatchProfInc.

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

11 years agoAdapt LibVEX_Init invocation due to VEX r2955 changes.
Florian Krohm [Mon, 22 Sep 2014 21:40:06 +0000 (21:40 +0000)] 
Adapt LibVEX_Init invocation due to VEX r2955 changes.

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

11 years agoRemove the valgrind_support parameter from LibVEX_Init. It's unused
Florian Krohm [Mon, 22 Sep 2014 21:39:12 +0000 (21:39 +0000)] 
Remove the valgrind_support parameter from LibVEX_Init. It's unused
and looks like an anachronism. VEX is also cleaner without valgrind things
creeping in.

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

11 years agoFix some comments that were still describing 32Gb as the limit for 'fast' memcheck
Philippe Waroquiers [Mon, 22 Sep 2014 19:46:48 +0000 (19:46 +0000)] 
Fix some comments that were still describing 32Gb as the limit for 'fast' memcheck

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

11 years agoAdd missing ]] to terminate CDATA. Missing brackets are causing
Philippe Waroquiers [Mon, 22 Sep 2014 19:19:50 +0000 (19:19 +0000)] 
Add missing ]] to terminate CDATA. Missing brackets are causing
the man page to contain:
               ></programlisting>

                     <para>And here are the same errors with
                     <option>--read-var-info=yes</option>:</para>

               <programlisting><![CDATA[

Rather than the nicely formatted 'And here ...' paragraph.

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

11 years agoConstification part 1.
Florian Krohm [Sun, 21 Sep 2014 21:53:39 +0000 (21:53 +0000)] 
Constification part 1.

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

11 years agoFix wrong checking of ARG2 of getrlimit
Philippe Waroquiers [Fri, 19 Sep 2014 19:35:24 +0000 (19:35 +0000)] 
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

11 years agoHandle explicitely all enum values in 'switch' on AddrInfo tag
Philippe Waroquiers [Fri, 19 Sep 2014 18:58:18 +0000 (18:58 +0000)] 
Handle explicitely all enum values in 'switch' on AddrInfo tag
(reported by Florian)

Note that Addr_Undescribed will cause an assert if such
an undescribed addrinfo is pretty printed, as normally
such addrinfo should always be described before being pretty printed.

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

11 years agoRemove anouncement of helgrind dead in coregrind/m_debuginfo/README.txt
Philippe Waroquiers [Fri, 19 Sep 2014 09:08:42 +0000 (09:08 +0000)] 
Remove anouncement of helgrind dead in coregrind/m_debuginfo/README.txt
as helgrind died many years ago, but resuscitate since then.

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

11 years agofix 339156 - gdbsrv not called for fatal signal
Philippe Waroquiers [Fri, 19 Sep 2014 08:57:29 +0000 (08:57 +0000)] 
fix 339156 - gdbsrv not called for fatal signal

In preparation for removing --db-attach=yes, call gdbserver
for a fatal signal (where --db-attach=yes is also calling gdb)

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

11 years agor14319 dropped adding -Wwrite-strings to the compile flags.
Florian Krohm [Thu, 18 Sep 2014 19:39:10 +0000 (19:39 +0000)] 
r14319 dropped adding -Wwrite-strings to the compile flags.
Add it back in.

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

11 years agoFix a few casts that dropped type qualifiers. As pointed out by
Florian Krohm [Thu, 18 Sep 2014 18:35:47 +0000 (18:35 +0000)] 
Fix a few casts that dropped type qualifiers. As pointed out by
-Wcast-qual.

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

11 years agoRemove a few useless asserts after memory allocation.
Florian Krohm [Thu, 18 Sep 2014 18:34:19 +0000 (18:34 +0000)] 
Remove a few useless asserts after memory allocation.
The called allocators don't return NULL.

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

11 years agoRemove a few pointless asserts because the allocation functions
Florian Krohm [Thu, 18 Sep 2014 18:24:20 +0000 (18:24 +0000)] 
Remove a few pointless asserts because the allocation functions
do not return NULL.

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

11 years agoEnable -Wcast-align globally.
Florian Krohm [Thu, 18 Sep 2014 18:10:37 +0000 (18:10 +0000)] 
Enable -Wcast-align globally.
Tested on x86-64, s390, and ppc64.

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

11 years agoOld STABS code is still being compiled, but never used. Remove it.
Mark Wielaard [Thu, 18 Sep 2014 12:24:53 +0000 (12:24 +0000)] 
Old STABS code is still being compiled, but never used. Remove it.

Since valgrind 3.9.0 the STABS support was already disabled completely.
But the code was still there being compiled and we were still searching
for stabs sections in binaries. Completely remove all sources, tests and
references. Add a note to coregrind/m_debuginfo/README.txt to mention
the old code can be found in the subversion repository.

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

11 years agoDRD: Handle Imbe_CancelReservation properly (clrex on ARM)
Bart Van Assche [Thu, 18 Sep 2014 07:11:24 +0000 (07:11 +0000)] 
DRD: Handle Imbe_CancelReservation properly (clrex on ARM)

This was reported by Florian and was detected by analyzing the
compiler output with -Wswitch-enum enabled.

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

11 years agodrd/Makefile.am: Add -Wswitch-enum
Bart Van Assche [Thu, 18 Sep 2014 06:54:52 +0000 (06:54 +0000)] 
drd/Makefile.am: Add -Wswitch-enum

Hopefully one day this compiler flag can be enabled for the entire Valgrind
code base.

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

11 years agoPrepare NEWS sections for the next release 3.11.0
Philippe Waroquiers [Wed, 17 Sep 2014 20:57:54 +0000 (20:57 +0000)] 
Prepare NEWS sections for the next release 3.11.0
+ add fixed bug
339020 - ppc64: memcheck/tests/ppc64/power_ISA2_05 failing in nightly build
in the fixed bugs section.

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

11 years agoFix type2index. It did not handle decimal floating point types.
Florian Krohm [Wed, 17 Sep 2014 19:48:36 +0000 (19:48 +0000)] 
Fix type2index. It did not handle decimal floating point types.
nameOfTypeIndex likewise.

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

11 years agoValgrind regression test fix for stfdpx instruction.
Carl Love [Wed, 17 Sep 2014 17:43:08 +0000 (17:43 +0000)] 
Valgrind regression test fix for stfdpx instruction.

There is a bug in the stfdpx instruction test for ppc32 and ppc64.
The inline assembly to move the arguments into the registers before
the store instruction were moving from the register not to the
register.  The error has been fixed.  This results in a change in
the expected output.

Additionally, it was noted that the inline assembly was using "f" rather
then "d" for the double arguments.  Similarly, the prints should have
been %lf not %f for doubles.  These changes were made but they did not
change the output of the tests.

This patch fixes Vagrind bugzilla 339020.

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

11 years agoCouple of fixes:
Florian Krohm [Tue, 16 Sep 2014 22:33:52 +0000 (22:33 +0000)] 
Couple of fixes:
- deepCopyIRConst failed to copy Ico_V256 constants
- deepCopyIRExpr did not copy Iex_Binder expressions
- handle_gets_Stmt should also handle an Ist_Put statement

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

11 years agoIn s390_decode_and_irgen don't divert the default case to a decoding error.
Florian Krohm [Tue, 16 Sep 2014 21:49:45 +0000 (21:49 +0000)] 
In s390_decode_and_irgen don't divert the default case to a decoding error.
That's wrong as the default case is never supposed to occur.

In disInstr_S390_WRK use vpanic for the default case for sake of consistency.

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

11 years agoFix incorrect use of VG_(tool_panic). Adapt checker script accordingly.
Florian Krohm [Tue, 16 Sep 2014 09:28:12 +0000 (09:28 +0000)] 
Fix incorrect use of VG_(tool_panic). Adapt checker script accordingly.

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

11 years agoUpdate a comment
Florian Krohm [Tue, 16 Sep 2014 07:20:21 +0000 (07:20 +0000)] 
Update a comment

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

11 years agocoregrind files shall use vg_assert not tl_assert.
Florian Krohm [Mon, 15 Sep 2014 20:57:45 +0000 (20:57 +0000)] 
coregrind files shall use vg_assert not tl_assert.
Tool files shall use tl_assert not vg_assert.
Fix code accordingly.
Adapted check_headers_and_includes to make sure the code
stays clean in that respect.

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

11 years agoFix leak that can happen in case of IO error between V gdbsrv and vgdb.
Philippe Waroquiers [Mon, 15 Sep 2014 20:20:24 +0000 (20:20 +0000)] 
Fix leak that can happen in case of IO error between V gdbsrv and vgdb.

Spotted by Florian Krohm/IBM BEAM checker

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

11 years agoRemove a comment that is no longer valid. The real reason we (now)
Florian Krohm [Mon, 15 Sep 2014 20:18:39 +0000 (20:18 +0000)] 
Remove a comment that is no longer valid. The real reason we (now)
don't provide strtoll etc is that we don't need the flexibility and
are too lazy to implement the general case :) But that does not
warrant a comment in the code.

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

11 years agoTidy up m_xarray.c.
Florian Krohm [Mon, 15 Sep 2014 18:50:17 +0000 (18:50 +0000)] 
Tidy up m_xarray.c.
VG_(newXA) and VG_(cloneXA) never return NULL. Remove pointless asserts.

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

11 years agoDocument NULL-ness of the return value of the dedup allocation functions.
Florian Krohm [Mon, 15 Sep 2014 07:21:36 +0000 (07:21 +0000)] 
Document NULL-ness of the return value of the dedup allocation functions.
Avoid conflict with reserved name 'free'.
Remove a few pointless asserts.

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

11 years agoDocument that VG_(newPA) and VG_(allocEltPA) never return NULL.
Florian Krohm [Sun, 14 Sep 2014 22:44:53 +0000 (22:44 +0000)] 
Document that VG_(newPA) and VG_(allocEltPA)  never return NULL.
Remove a few pointless asserts.
Avoid conflict with reserved name 'free'.

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

11 years agoDocument that VG_(newRangeMap) never returns NULL.
Florian Krohm [Sun, 14 Sep 2014 22:19:52 +0000 (22:19 +0000)] 
Document that VG_(newRangeMap) never returns NULL.
Remove pointless asserts.

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

11 years agoTidy up m_wordfm.
Florian Krohm [Sun, 14 Sep 2014 22:11:44 +0000 (22:11 +0000)] 
Tidy up m_wordfm.
First, as the allocator function does not fail, there is no need
to assert its return value.
Second, remove commented out (since r8765) function VG_(isEmptyFM).
Third, remove VG_(getNodeSizeFM) from the API. The details of the
implementation do not need to be exposed.
Fourth, for consistency require that the copy functions for keys and
values in VG_(dopyFM) (which are essentially like allocators) return
non-NULL values for non-NULL arguments if they return.
Fifth, document NULL-ness of return values for VG_(newFM), VG_(dopyFM),
and VG_(newBag). Remove pointless asserts at call sites.
Six, change avl_dopy to assert that the node the function is
supposed to copy is not NULL. It is called that way anyhow. With
that change the function never returns NULL which allows us to
simplify the call sites. Checking the return value is no longer needed.

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

11 years agoML_(dinfo_zalloc/strdup) never return NULL. Remove pointless
Florian Krohm [Sun, 14 Sep 2014 07:40:19 +0000 (07:40 +0000)] 
ML_(dinfo_zalloc/strdup) never return NULL. Remove pointless
asserts at call sites.

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