]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoRevert accidental checkin for Makefile.am
Florian Krohm [Fri, 6 Feb 2015 20:33:51 +0000 (20:33 +0000)] 
Revert accidental checkin for Makefile.am

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

11 years agoFix undefined behaviours when shifting.
Florian Krohm [Fri, 6 Feb 2015 20:32:15 +0000 (20:32 +0000)] 
Fix undefined behaviours when shifting.
Found by libubsan.

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

11 years agoThere must be at least one element in a VLA.
Florian Krohm [Fri, 6 Feb 2015 20:25:57 +0000 (20:25 +0000)] 
There must be at least one element in a VLA.
Found by libubsan.

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

11 years agoFix debug output of aspacemgr
Philippe Waroquiers [Thu, 5 Feb 2015 22:30:57 +0000 (22:30 +0000)] 
Fix debug output of aspacemgr
The list of segnames was shown with a seq nr,
while each segment was referencing its segname with an offset.
The patch ensures that at all places, both the seq nr and the
offset is output

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

11 years agoUpdate.
Julian Seward [Thu, 5 Feb 2015 16:22:43 +0000 (16:22 +0000)] 
Update.

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

11 years agoUpdate to track v4l2 API for kernel version 3.19 changes. Patch from
Julian Seward [Thu, 5 Feb 2015 15:59:01 +0000 (15:59 +0000)] 
Update to track v4l2 API for kernel version 3.19 changes.  Patch from
Hans Verkuil (hverkuil@xs4all.nl).  Fixes #343069.

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

11 years agoAdd wrapper support for I2C_SMBUS ioctls. Patch from
Julian Seward [Thu, 5 Feb 2015 15:52:46 +0000 (15:52 +0000)] 
Add wrapper support for I2C_SMBUS ioctls.  Patch from
super.firetwister@gmail.com.  Fixes #342603.

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

11 years agoEnable sys_mbind, sys_get_mempolicy, sys_set_mempolicy on arm64-linux.
Julian Seward [Thu, 5 Feb 2015 15:28:28 +0000 (15:28 +0000)] 
Enable sys_mbind, sys_get_mempolicy, sys_set_mempolicy on arm64-linux.
Patch from Hideaki Kimura (hideaki.kimura@gmail.com).  Fixes #342038.

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

11 years agoEnable FCVTMU Xd,Sn. Fixes #343332.
Julian Seward [Thu, 5 Feb 2015 15:22:30 +0000 (15:22 +0000)] 
Enable FCVTMU Xd,Sn.  Fixes #343332.

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

11 years agoAllow the user to specify precise-exception behaviour for translations
Julian Seward [Thu, 5 Feb 2015 12:59:46 +0000 (12:59 +0000)] 
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

11 years agoMake a very minor change to the LibVEX_Translate interface (sub-arg of
Julian Seward [Thu, 5 Feb 2015 12:53:20 +0000 (12:53 +0000)] 
Make a very minor change to the LibVEX_Translate interface (sub-arg of
needs_self_check) which allows VEX's user to selectively override, on
a per-translation basis, the default precise-exception control setting
that is specified in VexControl::iropt_register_updates.  Fix up
plumbing inside iropt so as to used passed-in values rather than the
default one.

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

11 years agovalgrind part to VEX:3083 Fix bugzilla 343802, also extend testcase
Christian Borntraeger [Thu, 5 Feb 2015 11:05:53 +0000 (11:05 +0000)] 
valgrind part to VEX:3083 Fix bugzilla 343802, also extend testcase

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

11 years agoFix bug 343802. We need to handle one more special case in the spechelper
Christian Borntraeger [Thu, 5 Feb 2015 11:05:10 +0000 (11:05 +0000)] 
Fix bug 343802. We need to handle one more special case in the spechelper

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

11 years agoFix some inconsistent uses of the VG_XACT_CLO macro, by putting an
Julian Seward [Thu, 5 Feb 2015 10:05:43 +0000 (10:05 +0000)] 
Fix some inconsistent uses of the VG_XACT_CLO macro, by putting an
empty then-body after the condition rather than merely ";", which is
confusing and is inconsistent with the rest of the arg handling code.
No functional change.

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

11 years agoguest_amd64_spechelper:
Julian Seward [Wed, 4 Feb 2015 19:05:13 +0000 (19:05 +0000)] 
guest_amd64_spechelper:
* add spec rules for B and NB after SUBB
* number (in comments) some existing cases.

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

11 years agoFollowup to r14901 (vectorising memcmp): use SizeT instead of Addr
Julian Seward [Wed, 4 Feb 2015 18:46:11 +0000 (18:46 +0000)] 
Followup to r14901 (vectorising memcmp): use SizeT instead of Addr
where appropriate.

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

11 years agoRemove unneeded code.
Florian Krohm [Wed, 4 Feb 2015 18:01:19 +0000 (18:01 +0000)] 
Remove unneeded code.
VG_(extend_stack) checks whether the given address is covered by the
stack.

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

11 years agoVectorise the memcmp template implementation. For scenarios requiring
Julian Seward [Wed, 4 Feb 2015 17:52:42 +0000 (17:52 +0000)] 
Vectorise the memcmp template implementation.  For scenarios requiring
a lot of memcmp-ing (firefox reftests) this is measurably faster.

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

11 years agodis_VMASKMOV: create per-lane transfer/no-transfer guard expressions
Julian Seward [Tue, 3 Feb 2015 18:01:41 +0000 (18:01 +0000)] 
dis_VMASKMOV: create per-lane transfer/no-transfer guard expressions
that are more Memcheck-friendly.  No functional change.

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

11 years agoUpdate list of open bugs, and classify them by area.
Julian Seward [Tue, 3 Feb 2015 12:27:30 +0000 (12:27 +0000)] 
Update list of open bugs, and classify them by area.

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

11 years agoPTRACE_GETREGS might not be detected on some distro, due to a missing #include
Philippe Waroquiers [Mon, 2 Feb 2015 22:40:54 +0000 (22:40 +0000)] 
PTRACE_GETREGS might not be detected on some distro, due to a missing #include
in the configure test.

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

11 years agoReplace the SegName array with a simple string table.
Florian Krohm [Sat, 31 Jan 2015 00:29:50 +0000 (00:29 +0000)] 
Replace the SegName array with a simple string table.
The validity of this change follows from the following observations:

(1) There is a single source for allocating and storing segment names,
    namely allocate_segname.
(2) For all invocations of allocate_segname the returned value (which
    represents the segmant name) is assigned to NSegment::fnIdx.
(3) All but one assignments to NSegment::fnIdx assign allocate_segname.
    The single exception assigns -1 in init_nsegment. That function is
    called whenever a new segment (named or unnamed) is allocated.

For a segment name to become unused there must be an assignment to
NSegment::fnIdx which was previously assigned a return value from
allocate_segname. There is no such assignment.
It follows that all segment names are in use at all times, hence
SegName::inUse == True for all SegNames. So we can constant fold it
and don't need to represent it.
Pass 3 in preen_nsegments is obsolete as there are no segment names to
garbage collect.

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

11 years agoRemove confusing function attribute. The function is always used (on all platforms).
Florian Krohm [Fri, 30 Jan 2015 22:21:16 +0000 (22:21 +0000)] 
Remove confusing function attribute. The function is always used (on all platforms).

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

11 years agoFix an incorrect comment. Add asserts.
Florian Krohm [Thu, 29 Jan 2015 23:01:14 +0000 (23:01 +0000)] 
Fix an incorrect comment. Add asserts.

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

11 years agoFix hwcaps validity checking for x86.
Florian Krohm [Thu, 29 Jan 2015 15:21:47 +0000 (15:21 +0000)] 
Fix hwcaps validity checking for x86.
Capabilities  x86-mmxext-sse1-sse2-sse3-lzcnt were rejected as invalid.

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

11 years agoUpdate.
Julian Seward [Wed, 28 Jan 2015 12:04:21 +0000 (12:04 +0000)] 
Update.

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

11 years agoppIRStoreG: print braces around guarded section, so as to be more
Julian Seward [Wed, 28 Jan 2015 12:03:26 +0000 (12:03 +0000)] 
ppIRStoreG: print braces around guarded section, so as to be more
consistent with other guarded-IR printing.  No functional change.

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

11 years agoAdd test cases for AVX-1 conditional vector stores:
Julian Seward [Wed, 28 Jan 2015 11:49:46 +0000 (11:49 +0000)] 
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

11 years agoImplement AVX-1 conditional vector stores: VMASKMOVP{D,S} xmm/ymm to memory.
Julian Seward [Wed, 28 Jan 2015 11:49:12 +0000 (11:49 +0000)] 
Implement AVX-1 conditional vector stores: VMASKMOVP{D,S} xmm/ymm to memory.
Fixes #335785.

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

11 years agoAdd test cases for VPMASKMOV{D,Q} xmm/ymm to memory.
Julian Seward [Wed, 28 Jan 2015 11:11:02 +0000 (11:11 +0000)] 
Add test cases for VPMASKMOV{D,Q} xmm/ymm to memory.

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

11 years agoUse IR conditional stores (IRStoreG) to implement AVX-2 conditional
Julian Seward [Wed, 28 Jan 2015 10:52:36 +0000 (10:52 +0000)] 
Use IR conditional stores (IRStoreG) to implement AVX-2 conditional
vector stores, VPMASKMOV{D,Q} xmm/ymm to memory.

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

11 years agoChange AMD64Instr_CMov64 so that the source can only be a register
Julian Seward [Tue, 27 Jan 2015 23:35:58 +0000 (23:35 +0000)] 
Change AMD64Instr_CMov64 so that the source can only be a register
instead of register-or-memory (an AMD64RM).  This avoids duplicating
conditional load functionality introduced in r3075 via
AMD64Instr_CLoad and in practice has no effect on the quality of the
generated code.

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

11 years agoAMD64 front end: translate AVX2 PMASKMOV load instructions (vector
Julian Seward [Tue, 27 Jan 2015 23:17:02 +0000 (23:17 +0000)] 
AMD64 front end: translate AVX2 PMASKMOV load instructions (vector
conditional loads) using IR conditional load statements IRLoadG rather
than the previous rather ingenious hack.

AMD64 back end:
* Add instruction selection etc for 32- and 64-bit conditional loads (IRLoadG)
* Handle dirty helper calls that return a value and that are conditional.  These
  result from Memcheck's instrumentation of IRLoadGs.

No functional change.  This is a cleanup as part of supporting AVX2
PMASKMOV loads and stores by using the existing IR facilities for
conditional loads and stores.

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

11 years agoHandle new value ILGop_Ident64 in enum type IRLoadGOp. This tracks
Julian Seward [Tue, 27 Jan 2015 23:10:19 +0000 (23:10 +0000)] 
Handle new value ILGop_Ident64 in enum type IRLoadGOp.  This tracks
vex r3074.

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

11 years agoAdd ILGop_Ident64 to enum type IRLoadGOp so as to make it
Julian Seward [Tue, 27 Jan 2015 23:09:23 +0000 (23:09 +0000)] 
Add ILGop_Ident64 to enum type IRLoadGOp so as to make it
possible to represent 64 bit conditional loads in IR.

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

11 years agoRemove unused field from NSegment structure.
Florian Krohm [Tue, 27 Jan 2015 20:46:19 +0000 (20:46 +0000)] 
Remove unused field from NSegment structure.

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

11 years agoOS X 10.10: Fix incorrect check for presence of unsupported MACH_SEND_TRAILER in...
Rhys Kidd [Mon, 26 Jan 2015 09:00:51 +0000 (09:00 +0000)] 
OS X 10.10: Fix incorrect check for presence of unsupported MACH_SEND_TRAILER in mach_msg. Partial fix for BZ #343306.

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

11 years agoDarwin14.supp should include suppression for known deliberate memory leak in setenv...
Rhys Kidd [Mon, 26 Jan 2015 03:44:07 +0000 (03:44 +0000)] 
Darwin14.supp should include suppression for known deliberate memory leak in setenv(). Per BZ #343303.

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

11 years agoPartial fix for bz339745. Mac OS: Further progress worker queue thread support. Addit...
Rhys Kidd [Mon, 26 Jan 2015 03:27:01 +0000 (03:27 +0000)] 
Partial fix for bz339745. Mac OS: Further progress worker queue thread support. Additional magic constants have been checked against OS X 10.9 and 10.10

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

11 years agoFollowup to r14886. So it turned out that in m_addrinfo we were already
Florian Krohm [Sat, 24 Jan 2015 18:26:05 +0000 (18:26 +0000)] 
Followup to r14886. So it turned out that in m_addrinfo we were already
strduping the filename which I failed to spot. Thanks to Philippe for
pointing that out.

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

11 years agoVG_(am_get_filename) returns a pointer to memory that belongs to the
Florian Krohm [Sat, 24 Jan 2015 00:02:19 +0000 (00:02 +0000)] 
VG_(am_get_filename) returns a pointer to memory that belongs to the
address space manager. Callers should neither modify the string nor
free it (as the string resides is statically allocated memory). That
calls for a   const HChar *
The type change exposed two bugs. One in m_addrinfo.c and one in
m_debuginfo.c. In both cases the returned string could possibly be freed later
on. So we need to strdup it first. Now fixed.

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

11 years agoMove comments next to the function prototypes they describe.
Florian Krohm [Fri, 23 Jan 2015 19:55:31 +0000 (19:55 +0000)] 
Move comments next to the function prototypes they describe.
No functional change.

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

11 years agoAdd function attributes.
Florian Krohm [Fri, 23 Jan 2015 16:53:06 +0000 (16:53 +0000)] 
Add function attributes.

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

11 years agoWrite proper wrappers for ioctls ION_IOC_ALLOC, ION_IOC_MAP and
Julian Seward [Fri, 23 Jan 2015 12:00:25 +0000 (12:00 +0000)] 
Write proper wrappers for ioctls ION_IOC_ALLOC, ION_IOC_MAP and
ION_IOC_IMPORT, and add a wrapper for SYNC_IOC_MERGE.

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

11 years agoFix an assert. Unbreak build on 32-bit platforms.
Florian Krohm [Wed, 21 Jan 2015 10:38:18 +0000 (10:38 +0000)] 
Fix an assert. Unbreak build on 32-bit platforms.

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

11 years agoAdd an assert to check that we're getting the expected alignment.
Florian Krohm [Tue, 20 Jan 2015 21:37:06 +0000 (21:37 +0000)] 
Add an assert to check that we're getting the expected alignment.

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

11 years agoMinor tweaks:
Florian Krohm [Tue, 20 Jan 2015 19:02:05 +0000 (19:02 +0000)] 
Minor tweaks:
- update a few boundary checks
- eliminate a loop
- remove a redundant assert

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

11 years agoAdd even more built-in functions for ICC.
Florian Krohm [Tue, 20 Jan 2015 18:46:13 +0000 (18:46 +0000)] 
Add even more built-in functions for ICC.
Patch by Gregory Czajkowski <gregczajkowski@yahoo.com>
Part of fixing BZ #339542.

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

11 years agoInitial trawl through bugs from 22 Nov 2014 to 20 Jan 2015.
Julian Seward [Tue, 20 Jan 2015 01:24:39 +0000 (01:24 +0000)] 
Initial trawl through bugs from 22 Nov 2014 to 20 Jan 2015.

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

11 years agoImport the list of bugs fixed in 3.10.1 (apparently never copied
Julian Seward [Tue, 20 Jan 2015 00:47:21 +0000 (00:47 +0000)] 
Import the list of bugs fixed in 3.10.1 (apparently never copied
into the trunk's NEWS file) and remove duplicates.

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

11 years agoPull in bugs opened after 22 Nov 2014.
Julian Seward [Tue, 20 Jan 2015 00:24:51 +0000 (00:24 +0000)] 
Pull in bugs opened after 22 Nov 2014.

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

11 years agoAdd some parentheses to keep gcc 5 (prerelease) from complaining.
Julian Seward [Tue, 20 Jan 2015 00:12:18 +0000 (00:12 +0000)] 
Add some parentheses to keep gcc 5 (prerelease) from complaining.
No functional change.

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

11 years agoHandle the memfd_create system call.
Tom Hughes [Mon, 19 Jan 2015 21:52:44 +0000 (21:52 +0000)] 
Handle the memfd_create system call.

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

11 years agoAdd more built-in functions for ICC.
Florian Krohm [Thu, 15 Jan 2015 15:54:40 +0000 (15:54 +0000)] 
Add more built-in functions for ICC.
Patch by Gregory Czajkowski <gregczajkowski@yahoo.com>
Part of fixing BZ #339542.

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

11 years agoRetroactive NEWS update for r14859, r14860 and r14861
Rhys Kidd [Wed, 14 Jan 2015 13:03:51 +0000 (13:03 +0000)] 
Retroactive NEWS update for r14859, r14860 and r14861

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

11 years agoExport VG_(discard_tranalsations_safely) to the tools. It is
Florian Krohm [Tue, 13 Jan 2015 17:33:59 +0000 (17:33 +0000)] 
Export VG_(discard_tranalsations_safely) to the tools. It is
only allowed to be called in certain contexts which is
enforced at runtime.
Change callgrind accordingly.
New header file pub_tool_transtab.h added.

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

11 years agoBZ #342795 Internal glibc __GI_mempcpy call should be intercepted.
Mark Wielaard [Tue, 13 Jan 2015 16:10:20 +0000 (16:10 +0000)] 
BZ #342795 Internal glibc __GI_mempcpy call should be intercepted.

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

11 years agoAdd to svn ignore auxprogs/getoff-*-darwin files created on OS X. The equivalent...
Rhys Kidd [Mon, 12 Jan 2015 13:29:29 +0000 (13:29 +0000)] 
Add to svn ignore auxprogs/getoff-*-darwin files created on OS X. The equivalent files are ignored from other architectures in this folder. Simple change, no-BZ.

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

11 years agoAdd to svn ignore gdbserver_tests/*.dSYM intermediate files created on OS X. These...
Rhys Kidd [Sun, 11 Jan 2015 07:04:20 +0000 (07:04 +0000)] 
Add to svn ignore gdbserver_tests/*.dSYM intermediate files created on OS X. These files are ignored in all other sub folders where created. Simple change, no-BZ.

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

11 years agoTrack VEX r3063 (function prototype change).
Florian Krohm [Sat, 10 Jan 2015 16:11:30 +0000 (16:11 +0000)] 
Track VEX r3063 (function prototype change).

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

11 years agoThe size of an event check never depends on the endianess
Florian Krohm [Sat, 10 Jan 2015 16:10:58 +0000 (16:10 +0000)] 
The size of an event check never depends on the endianess
of the host. Remove parameter.

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

11 years agoRemove superfluous function call.
Florian Krohm [Sat, 10 Jan 2015 15:25:54 +0000 (15:25 +0000)] 
Remove superfluous function call.

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

11 years agoRe-enable building of manythreads and thread-exits tests. Patch and discussion per...
Rhys Kidd [Fri, 9 Jan 2015 15:56:36 +0000 (15:56 +0000)] 
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

11 years agoDarwin13.supp should include suppression for known uninitialised read in pthread_rwlo...
Rhys Kidd [Fri, 9 Jan 2015 15:41:15 +0000 (15:41 +0000)] 
Darwin13.supp should include suppression for known uninitialised read in pthread_rwlock_init() as required to pass the memcheck/tests/darwin/pth-supp test. Patch and discussion per BZ #339780.

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

11 years agoDarwin13.supp should include suppression for known deliberate memory leak in setenv...
Rhys Kidd [Fri, 9 Jan 2015 15:32:07 +0000 (15:32 +0000)] 
Darwin13.supp should include suppression for known deliberate memory leak in setenv(). Patch and discussion per BZ #339755.

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

11 years agoComment only changes.
Florian Krohm [Thu, 8 Jan 2015 21:05:03 +0000 (21:05 +0000)] 
Comment only changes.

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

11 years agoClean up a few leftovers from the AIX port which no longer exists.
Florian Krohm [Thu, 8 Jan 2015 20:45:42 +0000 (20:45 +0000)] 
Clean up a few leftovers from the AIX port which no longer exists.

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

11 years agoAdd VG_(gettimeofday) such that callgrind can use it without
Florian Krohm [Thu, 8 Jan 2015 14:43:29 +0000 (14:43 +0000)] 
Add VG_(gettimeofday) such that callgrind can use it without
a bloody hack.

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

11 years agoCallgrind: fix BB discarding
Josef Weidendorfer [Thu, 8 Jan 2015 14:15:18 +0000 (14:15 +0000)] 
Callgrind: fix BB discarding

When the info struct for a BB is created, we use the first guest
instruction address as key to insert the info into a hash table.
We should do the same when discarding.

This actually is not a real problem, as Callgrind obviously
is used very rarely with redirections. But we should be consistent
with cachegrind.

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

11 years agoRemove the definitons of Ptr_to_ULong and ULong_to_Ptr.
Florian Krohm [Wed, 7 Jan 2015 20:14:48 +0000 (20:14 +0000)] 
Remove the definitons of Ptr_to_ULong and ULong_to_Ptr.
A cast to Addr replaces the former and the latter wasn't used.

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

11 years agoWhen creating a log-file (xml or otherwise) give everybody
Florian Krohm [Wed, 7 Jan 2015 14:47:15 +0000 (14:47 +0000)] 
When creating a log-file (xml or otherwise) give everybody
read permission. Previously, only user could read which was
incovenient for some typical workflows.
Suggested in BZ #339542.

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

11 years agoAdd command line option --max-connect=INT to allow the user to provide
Florian Krohm [Wed, 7 Jan 2015 14:42:11 +0000 (14:42 +0000)] 
Add command line option --max-connect=INT to allow the user to provide
an upper bound for the number of connected processes.
Part of fixing BZ #337869.

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

11 years agoThe following two lines of code always convert the 64-bit pointer to a 32-bit
Carl Love [Tue, 6 Jan 2015 19:47:51 +0000 (19:47 +0000)] 
The following two lines of code always convert the 64-bit pointer to a 32-bit
pointer.

 target = toUInt( Ptr_to_ULong(h_calc_BCDtoDPB ) );

    and

 target = toUInt( Ptr_to_ULong( h_calc_DPBtoBCD ) );

The toUInt() should only be used if we are running in 32-bit mode.  The lines
were changed to only convert the pointer to 32-bit if running in 32-bit mode.

There is no bugzilla for this issue.  It was noticed by Florian Krohm.

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

11 years agoFix a typo.
Florian Krohm [Tue, 6 Jan 2015 17:07:09 +0000 (17:07 +0000)] 
Fix a typo.

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

11 years agoFix assert
Philippe Waroquiers [Tue, 6 Jan 2015 15:15:07 +0000 (15:15 +0000)] 
Fix assert
   vex: priv/guest_generic_bb_to_IR.c:224 (bb_to_IR): Assertion `vex_control.guest_max_insns < 100' failed.
caused by giving --vex-guest-max-insns=100
100 should be allowed as described by --help-debug:
    --vex-guest-max-insns=<1..100>         [50]

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

11 years agoFixed missing ULL on constants per compiler warnings:
Carl Love [Mon, 5 Jan 2015 18:34:01 +0000 (18:34 +0000)] 
Fixed missing ULL on constants per compiler warnings:

gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVGPV_x86_linux_vanilla=1 -Ipriv  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wcast-align -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-long-long -Wcast-qual -Wwrite-strings -Wformat -Wformat-security -fno-stack-protector -fno-strict-aliasing -fno-builtin  -fomit-frame-pointer -Wbad-function-cast -Wcast-qual -fstrict-aliasing  -MT priv/libvex_x86_linux_a-guest_ppc_toIR.o -MD -MP -MF priv/.deps/libvex_x86_linux_a-guest_ppc_toIR.Tpo -c -o priv/libvex_x86_linux_a-guest_ppc_toIR.o `test -f 'priv/guest_ppc_toIR.c' || echo './'`priv/guest_ppc_toIR.c
priv/guest_ppc_toIR.c: In function ‘dis_vx_load’:
priv/guest_ppc_toIR.c:15333: warning: integer constant is too large for ‘long’ type
priv/guest_ppc_toIR.c:15334: warning: integer constant is too large for ‘long’ type

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

11 years agoSmall doc improvement: make more clear that --show-leak-kinds and --errors-for-leak...
Philippe Waroquiers [Mon, 5 Jan 2015 17:00:54 +0000 (17:00 +0000)] 
Small doc improvement:  make more clear that --show-leak-kinds and --errors-for-leak-kinds
have an effect only for a full leak search.

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

11 years agoFix compiler detection for ICC.
Florian Krohm [Mon, 5 Jan 2015 14:28:46 +0000 (14:28 +0000)] 
Fix compiler detection for ICC.
Patch by Gregory Czajkowski (gregczajkowski@yahoo.com).
Part of fixing BZ #339542.

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

11 years agoFix an incorrect truncation of an address value to 32 bits.
Florian Krohm [Mon, 5 Jan 2015 14:24:54 +0000 (14:24 +0000)] 
Fix an incorrect truncation of an address value to 32 bits.
Never heard anyone complain about it, so probably a rare case.

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

11 years agoAvoid warning on Addr sp, unused on some platforms (e.g. ppc32)
Philippe Waroquiers [Mon, 5 Jan 2015 13:31:07 +0000 (13:31 +0000)] 
Avoid warning on Addr sp, unused on some platforms (e.g. ppc32)

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

11 years agoFix Makefile.am so it works for builds configured with
Florian Krohm [Sun, 4 Jan 2015 22:55:45 +0000 (22:55 +0000)] 
Fix Makefile.am so it works for builds configured with
--enable-only32bit.

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

11 years agoFix a compiler warning about an incompatible format.
Florian Krohm [Sun, 4 Jan 2015 22:47:32 +0000 (22:47 +0000)] 
Fix a compiler warning about an incompatible format.
Shows up on 32-bit builds only.

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

11 years ago* Remove useless typedef and uses of Addr32 and Addr64, just use Addr
Philippe Waroquiers [Sun, 4 Jan 2015 20:33:50 +0000 (20:33 +0000)] 
* Remove useless typedef and uses of Addr32 and Addr64, just use Addr
* uses correct filename in "dying here #ifdef"
* small reformat

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

11 years agoChange most remaining use of Addr64 in coregrind and the tools to Addr.
Florian Krohm [Sun, 4 Jan 2015 17:20:45 +0000 (17:20 +0000)] 
Change most remaining use of Addr64 in coregrind and the tools to Addr.
Tracking VEX r3056.

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

11 years agoChange remaining use of Addr64 in the VEX API to Addr. The reduces
Florian Krohm [Sun, 4 Jan 2015 17:20:19 +0000 (17:20 +0000)] 
Change remaining use of Addr64 in the VEX API to Addr. The reduces
the size of VexGuestExtent to 20 bytes on a 32-bit platform.
Change prototypes of x86g_dirtyhelper_loadF80le and
x86g_dirtyhelper_storeF80le to give the address in the parameter
list type Addr. Likewise for amd64g_dirtyhelper_loadF80le and
amd64g_dirtyhelper_storeF80le.
Update switchback.c - but not tested.

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

11 years agoTyEnt::TyStOrUn::fieldRs is never NULL as VG_(newXA) always returns
Florian Krohm [Sun, 4 Jan 2015 11:30:11 +0000 (11:30 +0000)] 
TyEnt::TyStOrUn::fieldRs is never NULL as VG_(newXA) always returns
something != NULL. Testing fieldRs for NULL-ness was confusing static
analysis. It usually takes such tests as evidence that the pointer
can in fact be NULL and may report false positives as a consequence.

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

11 years agoTrack the IMark changes in VEX r3055.
Florian Krohm [Fri, 2 Jan 2015 17:32:40 +0000 (17:32 +0000)] 
Track the IMark changes in VEX r3055.

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

11 years agoChange the IMark statement. The address is now type Addr and the
Florian Krohm [Fri, 2 Jan 2015 17:32:21 +0000 (17:32 +0000)] 
Change the IMark statement. The address is now type Addr and the
length is unsigned.

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

11 years agoThe length of a disassemnled insn is always positive.
Florian Krohm [Fri, 2 Jan 2015 14:40:59 +0000 (14:40 +0000)] 
The length of a disassemnled insn is always positive.
Make DisResult::len an UInt.

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

11 years agoGive DisResult::continueAt Addr type.
Florian Krohm [Fri, 2 Jan 2015 13:34:15 +0000 (13:34 +0000)] 
Give DisResult::continueAt Addr type.

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

11 years agoTrack VEX r3052 (VexTranslateArgs::guest_bytes_addr is an Addr value).
Florian Krohm [Fri, 2 Jan 2015 11:45:57 +0000 (11:45 +0000)] 
Track VEX r3052 (VexTranslateArgs::guest_bytes_addr is an Addr value).
There is more to tidy up here -- but that's for anoher day.

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

11 years agoMake VexTranslateArgs::guest_bytes_addr an Addr value. Fix ripple.
Florian Krohm [Fri, 2 Jan 2015 11:44:12 +0000 (11:44 +0000)] 
Make VexTranslateArgs::guest_bytes_addr an Addr value. Fix ripple.

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

11 years agoRemove -Wcast-qual as it is already being added by Makefile.all.am
Florian Krohm [Thu, 1 Jan 2015 18:47:56 +0000 (18:47 +0000)] 
Remove -Wcast-qual as it is already being added by Makefile.all.am

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

11 years agoSynch compiler flags with those in valgrind's Makefile.all.am.
Florian Krohm [Thu, 1 Jan 2015 18:38:15 +0000 (18:38 +0000)] 
Synch compiler flags with those in valgrind's Makefile.all.am.
Add -std=gnu99.

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

11 years agoAdd -std=gnu99 to the list of compile flags.
Florian Krohm [Thu, 1 Jan 2015 18:26:05 +0000 (18:26 +0000)] 
Add -std=gnu99 to the list of compile flags.
Remove -Wno-long-long as it is no longer needed. long long is part
of C99.

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

11 years agoThe definition of type Addr has moved to VEX and
Florian Krohm [Wed, 31 Dec 2014 12:11:15 +0000 (12:11 +0000)] 
The definition of type Addr has moved to VEX and
the resteer callback has changed (VEX r3050). Track those changes.

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

11 years agoIt has long been assumed that host and guest architectures
Florian Krohm [Wed, 31 Dec 2014 12:09:38 +0000 (12:09 +0000)] 
It has long been assumed that host and guest architectures
are the same - even though the initial design goal was likely
different allowing a cross-valgrind of sorts. But as Julian
put it:
But it's been 12+ years and I've never once heard any mention of
such a thing.  So perhaps it's time to give up on that one.

Now let's take advantage of this decision and tighten up the VEX
API using Addr instead of Addr64. As a first step move the definition
of Addr into VEX proper and change the chase_into_ok callback
accordingly.

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

11 years agoImport offsetof and vg_alignof from VEX (tracking VEX r3049).
Florian Krohm [Mon, 29 Dec 2014 22:19:24 +0000 (22:19 +0000)] 
Import offsetof and vg_alignof from VEX (tracking VEX r3049).

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

11 years agoAs a library, VEX should not export the offsetof and vg_alignof
Florian Krohm [Mon, 29 Dec 2014 22:18:58 +0000 (22:18 +0000)] 
As a library, VEX should not export the offsetof and vg_alignof
macros. The latter isn't even used by VEX.
Move them to pub_tool_basics.h.
offsetof also goes to VEX's private header main_util.h.

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

11 years agoAdd a command line option to allow the user to provide an upper bound
Florian Krohm [Mon, 29 Dec 2014 22:07:35 +0000 (22:07 +0000)] 
Add a command line option to allow the user to provide an upper bound
for the number of connected processes. This is still lame but better
than asking her to recompile.
Part of fixing BZ #337869.

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