]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoDarwin only: don't tell aspacemgr about the kernel commpage -- only
Julian Seward [Tue, 8 Jul 2014 07:44:07 +0000 (07:44 +0000)] 
Darwin only: don't tell aspacemgr about the kernel commpage -- only
tell the tool.  This is because telling the aspacemgr about it causes
the sync checker to fail entirely on Darwin.

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

11 years agoAdd -Wno-tautological-compare to the standard compile flags, if that
Julian Seward [Tue, 8 Jul 2014 07:40:56 +0000 (07:40 +0000)] 
Add -Wno-tautological-compare to the standard compile flags, if that
is accepted.  With XCode 5.5.1 -Wtautological-compare appears to come
as standard, and it generates a lot of mostly useless noise.

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

11 years agoMark inline get function in image.c
Philippe Waroquiers [Sun, 6 Jul 2014 18:35:18 +0000 (18:35 +0000)] 
Mark inline get function in image.c
(called very often, and has a fast/slow case)
This slightly improve the performance of reading the image.

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

11 years agoFollow up to rev 13944
Philippe Waroquiers [Sat, 5 Jul 2014 18:43:24 +0000 (18:43 +0000)] 
Follow up to rev  13944
13944 objective was to avoid having a vgdb that connects to a just forked child
that would have the FIFO still opened, while its parent would close it.

However, in case a previous vgdb closed the FIFO, the read FIFO in the parent
is put in 'eof status' by the kernel. So, readchar will then return eof
in the parent unless another vgdb re-opens the FIFO in write.
So, gdbsrv does not stop anymore on error if needed, due to this readchar
giving eof.

The only way to reset this eof condition is to close the fd.
But we must always have the FIFO open (to avoid the race condition that
rev 13944 fixed)
=> in case of error, first re-open the FIFO, before closing the (previous)
FIFO fd (which is in eof state and cannot be properly used anymore).

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

11 years agoReplace copy/pasted loop of the "range search" by doing a -1 in the loop
Philippe Waroquiers [Sat, 5 Jul 2014 18:37:38 +0000 (18:37 +0000)] 
Replace copy/pasted loop of the "range search" by doing a -1 in the loop
for the "equal" case.

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

11 years agoSmall fixes/improvements post-cfsi_m improvement
Philippe Waroquiers [Sat, 5 Jul 2014 14:07:43 +0000 (14:07 +0000)] 
Small fixes/improvements post-cfsi_m improvement
* Avoid printing the size of a null dedup pool
* Avoid warnings of 2 unused variables on some platforms

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

11 years agoNEWS: Mention #336772, --default-suppressions and the std::thread update in the drd...
Bart Van Assche [Sat, 5 Jul 2014 06:52:48 +0000 (06:52 +0000)] 
NEWS: Mention #336772, --default-suppressions and the std::thread update in the drd manual

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

11 years agoSmall comment fix for the UInt* cfsi_m index : 4 instead of 3
Philippe Waroquiers [Fri, 4 Jul 2014 22:52:01 +0000 (22:52 +0000)] 
Small comment fix for the UInt* cfsi_m index : 4 instead of 3

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

11 years agoThis patch decreases significantly the memory needed to store the cfsi info.
Philippe Waroquiers [Fri, 4 Jul 2014 22:36:38 +0000 (22:36 +0000)] 
This patch decreases significantly the memory needed to store the cfsi info.

On a big executable, the trunk needs:
dinfo: 155844608/106737664  max/curr mmap'd 155572624/102276760 max/curr

With the patch, we have:
dinfo: 134873088/70389760  max/curr mmap'd 134607808/66717512 max/curr

So, peak dinfo memory decreases by 21Mb, and final by 36Mb.

The memory decrease is obtained by:

* using a dedup pool to store the machine dependent part (cfsi_m)
  of the cfsi information as this information is highly duplicated.
  For x86 and arm64, the duplication factor of cfsi machine dependent
  part is very high (up to a factor 60).
  For arm64, it is more like a factor 3.
  A 'variable size' (1, 2 or 4 bytes) is automatically used to identify
  the cfsi_m, if there is less than or more than 255/64K different cfsi_m.

* not storing explicitely the length of a range for which a cfsi_m
  is to be used: in a large majority of the cases, ranges are
  consecutive, and so the end of a range is just one byte before
  the start of the next range.
  So, we do not store the length of the ranges.
  If there is a hole between 2 ranges, the hole is stored explicitely
  as a range in which we have no cfsi_m information.
  On x86 and amd64, we have quite some holes (something like one hole
  every 7 cfsi). On arm64, we have very few holes (less than one hole
  every 50 cfsi).
  Even with the nr of holes on x86/amd64, it is more memory efficient
  to store the holes rather than to store the length of each cfsi.

* Merging consecutive ranges that have the same cfsi_m info:
  Many cfsi are "mergeable": there is no hole between 2 cfsi, and their
  machine dependent part is identical
  (I guess the unwind info needed by valgrind is subset of the full
   unwind info, and so, the cfsi entries are not merged by the compiler,
   but can be merged for simple unwind). Depending on the platform
   (x86, amd64, arm64) and of the library/object file, we can have a
   significant nr of mergeable entries.

The patch is not very small, but a lot is mechanical changes.

The patch has been compiled and tested on x86/amd64/ppc32/ppc64
(but ppc does not use cfsi so that just verifies it compiles).
It has been compiled on arm64, and "tested" by launching valgrind on
one executable.
It has not been compiled on s390 and mips.
With some luck, maybe it will compile on these platforms.
And if that uses the whole provision of luck for 2014, it might even work
on these platforms :).
If it does not compile, the fix should be straightforward.
Runtime problems might be more tricky (but arm64 "worked out of the box"
once x86/amd64 were ok).

This has also be tested in an outer/inner setup, to verify no memory leak/bugs.

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

11 years agoShadow registers wronly shown by gdb on avx machine
Philippe Waroquiers [Fri, 4 Jul 2014 21:53:29 +0000 (21:53 +0000)] 
Shadow registers wronly shown by gdb on avx machine
For an unclear reason, the orig_rax register and its shadows are described in the
xml file using a register number.
This register number is correct on non avx machine, but is wrong on
avx machine, as these have more registers, which means that orig_raxs1 and s2
should have different numbers.

As no reason was found to have a register number explicitely give, remove this
regnnr from the xml file, and let gdb calculate it.

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

11 years agoFix a bug in the "numbering" dedup pool: as indicated in
Philippe Waroquiers [Fri, 4 Jul 2014 20:40:02 +0000 (20:40 +0000)] 
Fix a bug in the "numbering" dedup pool: as indicated in
pub_tool_deduppoolalloc.h, for "numbering" pool, there is no guarantee
that the address of an element is stable if a new element is inserted.
But m_deduppoolalloc.c was itself not taking this 'no guarantee' into account.
So, when the addresses of the elements are changed due to reallocation
of the only pool, apply an offset to the element addresses stored in
the dedup hash table.

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

11 years agoSilence a compiler warning as issued by certain versions of GCC.
Florian Krohm [Thu, 3 Jul 2014 08:23:23 +0000 (08:23 +0000)] 
Silence a compiler warning as issued by certain versions of GCC.

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

11 years agoAdd forgotten .exp file. Should have been prt of r14124.
Florian Krohm [Tue, 1 Jul 2014 08:03:16 +0000 (08:03 +0000)] 
Add forgotten .exp file. Should have been prt of r14124.

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

11 years agoUpdate the C++ demangler by importing files from GCC trunk @ 212125.
Florian Krohm [Mon, 30 Jun 2014 21:04:16 +0000 (21:04 +0000)] 
Update the C++ demangler by importing files from GCC trunk @ 212125.
Add a smoke test for the demangler and update the helper script.

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

11 years agoAdd 'numbering identification' to the dedup pool.
Philippe Waroquiers [Mon, 30 Jun 2014 20:58:32 +0000 (20:58 +0000)] 
Add 'numbering identification' to the dedup pool.

The dedup pool can now be used to allocate elements and identify
them with a number rather than an address.

This new feature is not used (yet) but is intended to be used to
decrease the memory needed to store the CFSI information.

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

11 years agoImplement VG_(arena_realloc_shrink) similar to realloc, but can
Philippe Waroquiers [Mon, 30 Jun 2014 19:47:24 +0000 (19:47 +0000)] 
Implement VG_(arena_realloc_shrink) similar to realloc, but can
only decrease the size of a block, does not change the address,
does not need to alloc another block and copy the memory,
and (if big enough) makes the excess memory available for other
allocations.

VG_(arena_realloc_shrink) is then used for debuginfo storage.c
(replacing an allocation + copy).
Also use it in the dedup pool, to recuperate the unused
memory of the last pool.
This also allows to re-increase the string pool size to the original
3.9.0 value of 64Kb. All this slightly decrease the peak and in use
memory of dinfo.

VG_(arena_realloc_shrink) will also be used to implement (in another patch)
a dedup pool which "numbers" the allocated elements.

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

11 years agoarm64:
Julian Seward [Mon, 30 Jun 2014 07:35:19 +0000 (07:35 +0000)] 
arm64:
Add support for checking FPSR.QC effects of each instruction.
Implement: sadalp uadalp saddlp uaddlp saddlv uaddlv saddw{2} uaddw{2}
ssubw{2} usubw{2} shadd uhadd shsub uhsub sqadd uqadd sqsub uqsub
smaxp umaxp sminp uminp

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

11 years agoTrack vex r2894 (representation changes to arm64 FPSR)
Julian Seward [Sat, 28 Jun 2014 22:12:34 +0000 (22:12 +0000)] 
Track vex r2894 (representation changes to arm64 FPSR)

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

11 years agoEnable test cases for: sabal uabal sabdl uabdl saddl uaddl ssubl usubl
Julian Seward [Sat, 28 Jun 2014 12:22:22 +0000 (12:22 +0000)] 
Enable test cases for: sabal uabal sabdl uabdl saddl uaddl ssubl usubl
smlal umlal smlsl umlsl smull umull

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

11 years agoUpdate Subversion ignore lists
Bart Van Assche [Sat, 28 Jun 2014 07:40:20 +0000 (07:40 +0000)] 
Update Subversion ignore lists

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

11 years agoMake none/tests/filter_ioctl_moans executable
Bart Van Assche [Sat, 28 Jun 2014 07:39:47 +0000 (07:39 +0000)] 
Make none/tests/filter_ioctl_moans executable

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

11 years agoMake moans about unknown ioctls more informative (#336772)
Bart Van Assche [Sat, 28 Jun 2014 07:18:33 +0000 (07:18 +0000)] 
Make moans about unknown ioctls more informative (#336772)

This is a slightly modified version of a patch from Ivo Raisr <ivosh@ivosh.net>.

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

11 years agoEnable test cases for: rev32, rev64, saba, uaba, sabd, uabd.
Julian Seward [Fri, 27 Jun 2014 10:44:14 +0000 (10:44 +0000)] 
Enable test cases for: rev32, rev64, saba, uaba, sabd, uabd.

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

11 years agoAdd support for various SIOCETHTOOL operations. BZ#303536.
Tom Hughes [Fri, 27 Jun 2014 09:59:52 +0000 (09:59 +0000)] 
Add support for various SIOCETHTOOL operations. BZ#303536.

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

11 years agoWire up recvmmsg on arm. BZ#334585.
Tom Hughes [Thu, 26 Jun 2014 13:34:53 +0000 (13:34 +0000)] 
Wire up recvmmsg on arm. BZ#334585.

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

11 years agoAdd SIOCATMARK ioctl support.
Tom Hughes [Thu, 26 Jun 2014 13:14:56 +0000 (13:14 +0000)] 
Add SIOCATMARK ioctl support.

Patch from Austin English via BZ#335441.

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

11 years agoImplement various SNDRV_CTL_xxx ioctls.
Tom Hughes [Thu, 26 Jun 2014 12:53:23 +0000 (12:53 +0000)] 
Implement various SNDRV_CTL_xxx ioctls.

Patch from Ivan Sorokin via BZ#334936.

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

11 years agoarm64: add/enable testcases:
Julian Seward [Thu, 26 Jun 2014 12:40:54 +0000 (12:40 +0000)] 
arm64: add/enable testcases:
pmul, pmull, rbit, rev16,
LD1/ST1 (multiple 1-elem structs to/from 3 regs, no offset)
LD3/ST3 (multiple 3-elem structs to/from 3/regs, post index)

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

11 years agoHandle the HCIGETDEVLIST ioctl.
Tom Hughes [Thu, 26 Jun 2014 11:44:46 +0000 (11:44 +0000)] 
Handle the HCIGETDEVLIST ioctl.

Based on patch from Tomasz Nowak via BZ#335034.

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

11 years agoFix a couple of format string mixups.
Florian Krohm [Thu, 26 Jun 2014 11:30:05 +0000 (11:30 +0000)] 
Fix a couple of format string mixups.

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

11 years agoAdd support for the SG_IO ioctl.
Tom Hughes [Thu, 26 Jun 2014 11:29:05 +0000 (11:29 +0000)] 
Add support for the SG_IO ioctl.

Patch from Daniel Kamil Kozar via BZ#333817.

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

11 years agoHandle the CDROM_DISC_STATUS ioctl.
Tom Hughes [Thu, 26 Jun 2014 11:11:56 +0000 (11:11 +0000)] 
Handle the CDROM_DISC_STATUS ioctl.

Patch from Daniel Kamil Kozar via BZ#333788.

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

11 years agoRemove bug closed by reporter
Tom Hughes [Thu, 26 Jun 2014 11:07:42 +0000 (11:07 +0000)] 
Remove bug closed by reporter

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

11 years agoAdd support for TIOCNOTTY ioctl. BZ#331476.
Tom Hughes [Thu, 26 Jun 2014 11:03:32 +0000 (11:03 +0000)] 
Add support for TIOCNOTTY ioctl. BZ#331476.

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

11 years agoTrack vex r2890 (renaming of vector subparts-of-lanes-reversal IROps)
Julian Seward [Thu, 26 Jun 2014 10:51:03 +0000 (10:51 +0000)] 
Track vex r2890 (renaming of vector subparts-of-lanes-reversal IROps)

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

11 years agoTrack vex r2889 (rename vector Cls/Clz primops)
Julian Seward [Thu, 26 Jun 2014 08:22:01 +0000 (08:22 +0000)] 
Track vex r2889 (rename vector Cls/Clz primops)

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

11 years agoActivate --read-inline-info=yes for the outer/inner setup regtest run
Philippe Waroquiers [Wed, 25 Jun 2014 23:27:08 +0000 (23:27 +0000)] 
Activate --read-inline-info=yes for the outer/inner setup regtest run

as this makes the inner stacktraces easier to understand
and also it exercises the inline unwinding somewhat already,
waiting for a (possible) activation by default of --read-inline-info

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

11 years agoAdd intercepts for more OSX 10.9 malloc_zone functions:
Julian Seward [Wed, 25 Jun 2014 11:24:16 +0000 (11:24 +0000)] 
Add intercepts for more OSX 10.9 malloc_zone functions:
malloc_default_purgeable_zone malloc_create_zone
malloc_zone_check malloc_zone_register malloc_zone_unregister
malloc_set_zone_name malloc_get_zone_name

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

11 years agoIntercept libsystem_platform.dylib:_platform_strncmp and dyld:memchr
Julian Seward [Wed, 25 Jun 2014 11:17:46 +0000 (11:17 +0000)] 
Intercept libsystem_platform.dylib:_platform_strncmp and dyld:memchr
on OSX 10.9.

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

11 years agoUpdate suppressions for OSX 10.9 (64-bit)
Julian Seward [Wed, 25 Jun 2014 11:15:51 +0000 (11:15 +0000)] 
Update suppressions for OSX 10.9 (64-bit)

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

11 years ago2 execontexts in an hash table chain are not necessarily the same size.
Philippe Waroquiers [Tue, 24 Jun 2014 22:13:43 +0000 (22:13 +0000)] 
2 execontexts in an hash table chain are not necessarily the same size.
So, ensure that when size differs, we do not start to compare them,
as this could otherwise cause a read buffer overrun

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

11 years agoFix Makefile 'MISSING EXTRA_DIST' due to addition of tc20_verifywrap.stderr.exp-glibc...
Philippe Waroquiers [Tue, 24 Jun 2014 21:08:44 +0000 (21:08 +0000)] 
Fix Makefile 'MISSING EXTRA_DIST' due to addition of tc20_verifywrap.stderr.exp-glibc-2.18

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

11 years agoFix a regression in supp matching with obj: entries
Philippe Waroquiers [Tue, 24 Jun 2014 20:48:25 +0000 (20:48 +0000)] 
Fix a regression in supp matching with obj: entries

Suppression matching logic was changed to understand inlined function calls.
A regression was introduced while doing this. This regression could
cause false positive supp matches or false negative supp matches, when
obj: lines are used.

This patch fixes the regression, and adds 2 tests (one that was failing
with false positive, one that was failing with false negative).

The fix is relatively small (3 places where there was an "off or excess by one").
However, a lot more tracing was added in the supp matching logic, as this
logic is quite complex (for performance reasons mostly).
We might need more tests to properly cover supp matching logic.

So, giving -d -d -d -d produces a trace showing how a stacktrace was expanded
by the input completer and which suppression (if any) it matched.
Below is an example of trace. It shows a begin/end marker. The end marker
indicates if a supp matched. Then it shows the stack trace, and the state
of the lazy "input completer" used for the matching.
In the below, the trace shows that there are 3 IPs in the stacktrace
(n_ips 3) : Two are not shown (below main), and one IP corresponds
to main calling 4 inlined functions (so we have only one IP for 5 entries
in the stacktrace).
The state of the input completer shows that 2 IPs were expanded, resulting
in 6 expanded fun: or obj: lines.
The offset shows that ips0 corresponds to the entries [0,4] in ip2fo->funoffset
or ip2fo->objoffset.
This tracing should make it more clear what was used to match a stacktrace
with the suppression entries.

--10314-- errormgr matching begin
--10314-- errormgr matching end suppression main_a_b_c_d  ./memcheck/tests/inlinfosupp.supp:2 matched:
==10314==    at 0x8048667: fun_d (inlinfo.c:7)
==10314==    by 0x8048667: fun_c (inlinfo.c:15)
==10314==    by 0x8048667: fun_b (inlinfo.c:21)
==10314==    by 0x8048667: fun_a (inlinfo.c:27)
==10314==    by 0x8048667: main (inlinfo.c:66)
n_ips 3 n_ips_expanded 2 resulting in n_expanded 6
ips 0 0x088048667 offset [0,4] fun:fun_d obj:/home/philippe/valgrind/objcompl/memcheck/tests/inlinfo
                              fun:fun_c obj:/home/philippe/valgrind/objcompl/memcheck/tests/inlinfo
                              fun:fun_b obj:/home/philippe/valgrind/objcompl/memcheck/tests/inlinfo
                              fun:fun_a obj:/home/philippe/valgrind/objcompl/memcheck/tests/inlinfo
                              fun:main obj:/home/philippe/valgrind/objcompl/memcheck/tests/inlinfo
ips 1 0x0822abb5 offset [5,5] fun:(below main) obj:<not expanded>

Complete tracing (including individual pattern matching) can be activated
by recompiling m_errormgr.c after changing
#define DEBUG_ERRORMGR 0
to
#define DEBUG_ERRORMGR 1

This detailed tracing will be shown between the begin/end marker.

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

11 years agoAccording to Julian initialising the previously uninitialised variable
Florian Krohm [Tue, 24 Jun 2014 15:33:53 +0000 (15:33 +0000)] 
According to Julian initialising the previously uninitialised variable
won't affect the test adversely -- so let's do this and get rid of
the special compilation again. Also guard against future compiler smartness
tricking the compiler into believing the variable is actually used.
So the loop won't get optimised away.

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

11 years agoMake error message more precise.
Florian Krohm [Tue, 24 Jun 2014 13:08:44 +0000 (13:08 +0000)] 
Make error message more precise.

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

11 years agoSuppress a clang warning about an uninitialised variable.
Florian Krohm [Tue, 24 Jun 2014 11:35:45 +0000 (11:35 +0000)] 
Suppress a clang warning about an uninitialised variable.
Fixes BZ #329694.

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

11 years agohelgrind/tests/tc20_verifywrap: Port to glibc >= 2.18
Bart Van Assche [Tue, 24 Jun 2014 05:12:43 +0000 (05:12 +0000)] 
helgrind/tests/tc20_verifywrap: Port to glibc >= 2.18

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

11 years agoRename --defaultsupp into --default-suppressions as requested by Julian
Bart Van Assche [Tue, 24 Jun 2014 05:08:21 +0000 (05:08 +0000)] 
Rename --defaultsupp into --default-suppressions as requested by Julian

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

11 years agoDocument return value of VALGRIND_MAKE_MEM_DEFINED and friends.
Florian Krohm [Mon, 23 Jun 2014 21:23:44 +0000 (21:23 +0000)] 
Document return value of VALGRIND_MAKE_MEM_DEFINED and friends.

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

11 years agoBZ 330257 has been fixed in r14055.
Florian Krohm [Mon, 23 Jun 2014 19:43:32 +0000 (19:43 +0000)] 
BZ 330257 has been fixed in r14055.

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

11 years agoUpdate the copyright notice in files ending in '.in' because the
Florian Krohm [Mon, 23 Jun 2014 19:33:45 +0000 (19:33 +0000)] 
Update the copyright notice in files ending in '.in' because the
script change-copyright-year did not handle them.
Update the script as well.

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

11 years agoOS X 10.9: Add redirections for strnlen, strcpy, strncpy,
Julian Seward [Mon, 23 Jun 2014 16:03:45 +0000 (16:03 +0000)] 
OS X 10.9: Add redirections for strnlen, strcpy, strncpy,
platform_memchr, _platform_memcmp.

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

11 years ago* Move the new 10.9 syscalls into their own section.
Julian Seward [Mon, 23 Jun 2014 16:02:04 +0000 (16:02 +0000)] 
* Move the new 10.9 syscalls into their own section.
* Add a POST_MEM_WRITE for kernelrpc_mach_vm_map_trap
* fix a compiler complaint caused by lack of a cast

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

11 years agoWrap long lines in kernelrpc_mach_* PRE/POST handlers. No functional
Julian Seward [Mon, 23 Jun 2014 13:09:38 +0000 (13:09 +0000)] 
Wrap long lines in kernelrpc_mach_* PRE/POST handlers.  No functional
change.

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

11 years agoEnable more test cases:
Julian Seward [Mon, 23 Jun 2014 09:10:20 +0000 (09:10 +0000)] 
Enable more test cases:
ins (vec[], vec[])
mla, mls, mul (vec, vec, vec[])
various more movi/mvni cases
not 16b/8b

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

11 years agoMake none/tests/cmdline[12] pass again
Bart Van Assche [Sun, 22 Jun 2014 11:13:47 +0000 (11:13 +0000)] 
Make none/tests/cmdline[12] pass again

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

11 years agodrd/tests/std_thread2: Re-enable
Bart Van Assche [Sun, 22 Jun 2014 10:13:47 +0000 (10:13 +0000)] 
drd/tests/std_thread2: Re-enable

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

11 years agocore: Add command-line option --defaultsupp
Bart Van Assche [Sun, 22 Jun 2014 10:11:59 +0000 (10:11 +0000)] 
core: Add command-line option --defaultsupp

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

11 years agoAdd Iop_Abs64x2; unbreak build.
Florian Krohm [Sun, 22 Jun 2014 07:35:03 +0000 (07:35 +0000)] 
Add Iop_Abs64x2; unbreak build.

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

11 years agoUpdate list of ignored files.
Florian Krohm [Sat, 21 Jun 2014 21:03:48 +0000 (21:03 +0000)] 
Update list of ignored files.

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

11 years agoms_print ought to create temporary files in a proper directory as
Florian Krohm [Sat, 21 Jun 2014 20:25:30 +0000 (20:25 +0000)] 
ms_print ought to create temporary files in a proper directory as
specified with --with-tmpdir at configuration time or with TMPDIR
at runtime. Doing so fixes the symptom reported in BZ #332765.
Also fix an incorrect error message.

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

11 years agoFind the name of the inlined function through a DW_AT_specification
Philippe Waroquiers [Sat, 21 Jun 2014 12:41:48 +0000 (12:41 +0000)] 
Find the name of the inlined function through a DW_AT_specification
The name is not necessarily found in the abstract origin, it can be
in a referred to specification.

If both a name and a DW_AT_specification is found in the abstract origin,
the name will have priority over the name of the specification.
(unclear if that can happen)

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

11 years agoThis optimisation divides by 2.5 the time (user+sys) needed to read
Philippe Waroquiers [Sat, 21 Jun 2014 10:57:33 +0000 (10:57 +0000)] 
This optimisation divides by 2.5 the time (user+sys) needed to read
the inlined info of a big executable.
On a slow pentium, reading the inline info now takes 5.5 seconds.

The optimisation consists in having per dw3 abbreviation a structure
allowing to skip efficiently the non interesting DIEs (i.e. the DIEs
the parse_inl_DIE is not interested in).
Mostly, the idea is to avoid calling the image abstraction, and replace
this by just advancing the cursor (i.e. addition rather than a bunch
of function calls to read the data).

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

11 years agoUse macro TD3 defined as UNLIKELY(td3) for tracing
Philippe Waroquiers [Sat, 21 Jun 2014 09:48:17 +0000 (09:48 +0000)] 
Use macro TD3 defined as UNLIKELY(td3) for tracing
to be sure the compiler understands that usually, we do not trace

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

11 years agoOS X 10.9: add intercepts for
Julian Seward [Sat, 21 Jun 2014 09:40:19 +0000 (09:40 +0000)] 
OS X 10.9: add intercepts for
libsystem_platform.dylib : _platform_strchr
libsystem_c.dylib : strlen
libsystem_platform.dylib : _platform_strcmp

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

11 years agoWhitespace and comment-only changes. No functional change.
Julian Seward [Sat, 21 Jun 2014 09:37:46 +0000 (09:37 +0000)] 
Whitespace and comment-only changes.  No functional change.

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

11 years agokernelrpc_mach_vm_allocate_trap writes the resulting address to *ARG2
Julian Seward [Sat, 21 Jun 2014 09:36:19 +0000 (09:36 +0000)] 
kernelrpc_mach_vm_allocate_trap writes the resulting address to *ARG2
on successful return.  We need to mark this as defined.

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

11 years agoRedirect strchr in dyld (the dynamic linker) on OS X 10.9, for
Julian Seward [Sat, 21 Jun 2014 09:34:22 +0000 (09:34 +0000)] 
Redirect strchr in dyld (the dynamic linker) on OS X 10.9, for
the usual reason.

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

11 years agoFix a few Char / HChar mixups.
Florian Krohm [Fri, 20 Jun 2014 21:47:41 +0000 (21:47 +0000)] 
Fix a few Char / HChar mixups.

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

11 years agoFix a missing-prototype warning on OS X 10.7.
Julian Seward [Fri, 20 Jun 2014 15:30:18 +0000 (15:30 +0000)] 
Fix a missing-prototype warning on OS X 10.7.

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

11 years agoMark unused functions as unused, to keep Clang happy.
Julian Seward [Fri, 20 Jun 2014 14:25:53 +0000 (14:25 +0000)] 
Mark unused functions as unused, to keep Clang happy.

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

11 years agoRemove unused function swapfunc().
Julian Seward [Fri, 20 Jun 2014 14:17:09 +0000 (14:17 +0000)] 
Remove unused function swapfunc().

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

11 years agoRemove fd_exists(), as it is never used.
Julian Seward [Fri, 20 Jun 2014 14:14:59 +0000 (14:14 +0000)] 
Remove fd_exists(), as it is never used.

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

11 years agoFix incorrect header guard macro, as awesomely detected by clang.
Julian Seward [Fri, 20 Jun 2014 14:11:27 +0000 (14:11 +0000)] 
Fix incorrect header guard macro, as awesomely detected by clang.

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

11 years agoFix a -Wshadow warning from some oldish version of XCode.
Julian Seward [Fri, 20 Jun 2014 14:07:38 +0000 (14:07 +0000)] 
Fix a -Wshadow warning from some oldish version of XCode.

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

11 years agoMac OS X 10.9 improvements. Bug 326724 comment 27 patch name
Julian Seward [Fri, 20 Jun 2014 13:38:04 +0000 (13:38 +0000)] 
Mac OS X 10.9 improvements.  Bug 326724 comment 27 patch name
"0005-darwin-try-to-improve-support-for-mach_msg-on-extern.patch"
(Frederic Germain, frederic.germain@gmail.com)

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

11 years agoMac OS X 10.9 improvements. Bug 326724 comment 27 patch name
Julian Seward [Fri, 20 Jun 2014 13:29:31 +0000 (13:29 +0000)] 
Mac OS X 10.9 improvements.  Bug 326724 comment 27 patch name
"0004-wqthread_hijack-fix-magic_delta-on-darwin-10.9.patch"
(Frederic Germain, frederic.germain@gmail.com)

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

11 years agoMac OS X 10.9 improvements. Bug 326724 comment 27 patch name
Julian Seward [Fri, 20 Jun 2014 13:22:57 +0000 (13:22 +0000)] 
Mac OS X 10.9 improvements.  Bug 326724 comment 27 patch name
"0003-darwin-remove-warnings-in-logs-related-to-Char-HChar.patch"
(Frederic Germain, frederic.germain@gmail.com)

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

11 years agoMac OS X 10.9 improvements. Bug 326724 comment 27 patch name
Julian Seward [Fri, 20 Jun 2014 13:13:57 +0000 (13:13 +0000)] 
Mac OS X 10.9 improvements.  Bug 326724 comment 27 patch name
"0002-thread_state_from_vex-adding-support-for-x86_THREAD_.patch"
(Frederic Germain, frederic.germain@gmail.com)

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

11 years agoUn-break the build on OS X 10.8 following r14057
Julian Seward [Fri, 20 Jun 2014 13:08:51 +0000 (13:08 +0000)] 
Un-break the build on OS X 10.8 following r14057
(0001-adding-support-for-loads-of-new-syscall-in-darwin-10.patch)

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

11 years agoMac OS X 10.9 improvements. Bug 326724 comment 27 patch name
Julian Seward [Fri, 20 Jun 2014 12:35:00 +0000 (12:35 +0000)] 
Mac OS X 10.9 improvements.  Bug 326724 comment 27 patch name
"0001-adding-support-for-loads-of-new-syscall-in-darwin-10.patch"
(Frederic Germain, frederic.germain@gmail.com)

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

11 years agoUn-break the build on OS X 10.8 following
Julian Seward [Fri, 20 Jun 2014 12:09:10 +0000 (12:09 +0000)] 
Un-break the build on OS X 10.8 following
14055 ("initial build support for Mac OS X 10.9")

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

11 years agoAdd initial build support for Mac OS X 10.9 (Mavericks). Bug 326724
Julian Seward [Fri, 20 Jun 2014 11:48:38 +0000 (11:48 +0000)] 
Add initial build support for Mac OS X 10.9 (Mavericks).  Bug 326724
comment 12.  (Diego Giagio, diego@giagio.com)

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

11 years agoEnable/enhance test cases for: dup_{d_d[], s_s[], h_h[], b_b[]}, ext
Julian Seward [Thu, 19 Jun 2014 22:21:28 +0000 (22:21 +0000)] 
Enable/enhance test cases for: dup_{d_d[], s_s[], h_h[], b_b[]}, ext

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

11 years agoImprove/fix hash table collision statistics + remove useless space in gdbsrv hostvisi...
Philippe Waroquiers [Thu, 19 Jun 2014 20:33:27 +0000 (20:33 +0000)] 
Improve/fix hash table collision statistics + remove useless space in gdbsrv hostvisibility keywork

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

11 years agoEnable test cases for: orr_{8h,4h}_imm8_shifted,
Julian Seward [Thu, 19 Jun 2014 14:22:20 +0000 (14:22 +0000)] 
Enable test cases for: orr_{8h,4h}_imm8_shifted,
orr_{4s,2s}_imm8_shifted, bic_{8h,4h}_imm8_shifted,
bic_{4s,2s}_imm8_shifted, cls_std6_std6, cm{eq,ge,gt,hi,hs,tst}_d_d_d,
cm{ge,gt,le,lt}_d_d_zero, cnt_{16,8}b_{16,8}b

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

11 years agoWhen printing "REDIR:" lines at -v, print not only the name of the
Julian Seward [Tue, 17 Jun 2014 20:37:08 +0000 (20:37 +0000)] 
When printing "REDIR:" lines at -v, print not only the name of the
function being redirected but also the soname of the object that it is
in.  This makes it a bit easier to diagnose redirection problems.

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

11 years agorestructure dwarf3 DIE tracing
Philippe Waroquiers [Tue, 17 Jun 2014 20:21:26 +0000 (20:21 +0000)] 
restructure dwarf3 DIE tracing
* add a trace_DIE function
* use it to trace a bad DIE
  and to trace all DIEs that are (maybe) read

(due to the "avoid read twice" optimisation, the tracing was not
so easy to read anymore => add an explicit trace_DIE call at the beginning
of read_DIE)

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

11 years agooptimisation : avoid double reading of a DIE when the DIE will be parsed
Philippe Waroquiers [Mon, 16 Jun 2014 21:49:42 +0000 (21:49 +0000)] 
optimisation : avoid double reading of a DIE when the DIE will be parsed
by a DIE parser

Instead of pre-reading the DIE, first let the parser(s) possibly
parse the DIE. Read (to skip) the DIE data if no parser has parsed it.
OTherwise, just jump to the end of the DIE as established by the parser
that has read the DIE.

This slightly improves the reading of inlined info.

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

11 years agoRefine NEWS entry for helgrind Ada tasks intercepts
Philippe Waroquiers [Mon, 16 Jun 2014 21:26:24 +0000 (21:26 +0000)] 
Refine NEWS entry for helgrind Ada tasks intercepts

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

11 years agoUse a string literal format to avoid a gcc warning (-Wformat-security)
Philippe Waroquiers [Mon, 16 Jun 2014 21:25:31 +0000 (21:25 +0000)] 
Use a string literal format to avoid a gcc warning (-Wformat-security)

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

11 years agoAdd helgrind intercepts to have helgrind understanding Ada tasks terination rules
Philippe Waroquiers [Mon, 16 Jun 2014 20:00:14 +0000 (20:00 +0000)] 
Add helgrind intercepts to have helgrind understanding Ada tasks terination rules
A recent gnatpro version is needed for this to work.

Thanks to these intercepts, some false positive errors are avoided,
and helgrind properly recuperates some internal memory associated
to the terminated task.

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

11 years agoAnnounce in NEWS 199144 == 278972
Philippe Waroquiers [Mon, 16 Jun 2014 18:28:51 +0000 (18:28 +0000)] 
Announce in NEWS 199144  == 278972

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

11 years agoFix random crash due to non-init inlparser when --read-var-info given but not --read...
Philippe Waroquiers [Mon, 16 Jun 2014 18:08:02 +0000 (18:08 +0000)] 
Fix random crash due to non-init inlparser when --read-var-info given but not --read-inline-info

Wrong place for the assertion for the inlparser
+ move the "zero the parsers" out of the "if VG_(clo*)" conditions

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

11 years agoHandle new IROp Iop_Abs64x2.
Julian Seward [Sun, 15 Jun 2014 21:56:54 +0000 (21:56 +0000)] 
Handle new IROp Iop_Abs64x2.

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

11 years agoEnable test cases for instructions implemented today.
Julian Seward [Sun, 15 Jun 2014 21:56:28 +0000 (21:56 +0000)] 
Enable test cases for instructions implemented today.

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

11 years agoAdd a comment to document a possible optimisation (avoid double reading
Philippe Waroquiers [Sun, 15 Jun 2014 21:49:13 +0000 (21:49 +0000)] 
Add a comment to document a possible optimisation (avoid double reading
of DIEs when one or more parsers will read them also)
+ add the name of the parser in the barf output.

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

11 years agoWhen only reading inline info, no need to parse debug_types sections
Philippe Waroquiers [Sun, 15 Jun 2014 19:16:46 +0000 (19:16 +0000)] 
When only reading inline info, no need to parse debug_types sections

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

11 years agoFix some obsolete comments, now that we have an ht of parsed abbvs
Philippe Waroquiers [Sun, 15 Jun 2014 18:28:31 +0000 (18:28 +0000)] 
Fix some obsolete comments, now that we have an ht of parsed abbvs

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

11 years agoseparate the tracing code in other function, call the tracing code only
Philippe Waroquiers [Sun, 15 Jun 2014 18:06:20 +0000 (18:06 +0000)] 
separate the tracing code in other function, call the tracing code only
if trace active.

This makes the code somewhat easier to read and somewhat more efficient

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