]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
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

11 years agoAnnounce in NEWS the support for inlined function calls in stacktraces/suppressions
Philippe Waroquiers [Sun, 15 Jun 2014 15:54:58 +0000 (15:54 +0000)] 
Announce in NEWS the support for inlined function calls in stacktraces/suppressions

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

11 years agoThis patch implements the support needed for stacktraces
Philippe Waroquiers [Sun, 15 Jun 2014 15:42:20 +0000 (15:42 +0000)] 
This patch implements the support needed for stacktraces
showing inlined function calls.
See 278972 valgrind stacktraces and suppression do not handle inlined function call debuginfo

Reading the inlined dwarf call info is activated using the new clo
  --read-inline-info=yes
Default is currently no but an objective is to optimise the performance
and memory in order to possibly set it on by default.
(see below discussion about performances).

Basically, the patch provides the following pieces:
1. Implement a new dwarf3 reader that reads the inlined call info
2. Some performance improvements done for this new parser, and
   on some common code between the new parser and the var info parser.
3. Use the parsed inlined info to produce stacktrace showing inlined calls
4. Use the parsed inlined info in the suppression matching and suppression generation
5. and of course, some reg tests

1. new dwarf3 reader:
---------------------
Two options were possible: add the reading of the inlined info
in the current var info dwarf reader, or add a 2nd reader.
The 2nd approach was preferred, for the following reasons:
The var info reader is slow, memory hungry and quite complex.
Having a separate parsing phase for the inlined information
is simpler/faster when just reading the inlined info.
Possibly, a single parser would be faster when using both
--read-var-info=yes and --read-inline-info=yes.
However, var-info being extremely memory/cpu hungry, it is unlikely
to be used often, and having a separate parsing for inlined info
does in any case make not much difference.
(--read-var-info=yes is also now less interesting thanks to commit
r13991, which provides a fast and low memory "reasonable" location
for an address).

The inlined info parser reads the dwarf info to make calls
to priv_storage.h ML_(addInlInfo).

2. performance optimisations
----------------------------
* the abbrev cache has been improved in revision r14035.
* The new parser skips the non interesting DIEs
  (the var-info parser has no logic to skip uninteresting DIEs).
* Some other minor perf optimisation here and there.
In total now, on a big executable, 15 seconds CPU are needed to
create the inlined info (on my slow x86 pentium).

With regards to memory, the dinfo arena:
with inlined info: 172281856/121085952  max/curr mmap'd
without          : 157892608/106721280  max/curr mmap'd,
So, basically, inlined information costs about 15Mb of memory for
my big executable (compared to first version of the patch, this is
already using less memory, thanks to the strpool deduppoolalloc.
The needed memory can probably be decreased somewhat more.

3. produce better stack traces
------------------------------
VG_(describe_IP) has a new argument InlIPCursor *iipc which allows
to describe inlined function calls by doing repetitive calls
to describe_IP. See pub_tool_debuginfo.h for a description.

4. suppression generation and matching
--------------------------------------
* suppression generation now also uses an InlIPCursor *iipc
  to generate a line for each inlined fn call.

* suppression matching: to allow suppression matching to
match one IP to several function calls in a suppression entry,
the 'inputCompleter' object (that allows to lazily generate
function or object names for a stacktrace when matching
an error with a suppression) has been generalised a little bit
more to also lazily generate the input sequence.
VG_(generic_match) has been updated so as to be more generic
with respect to the input completer : when providing an
input completer, VG_(generic_match) does not need anymore
to produce/compute any input itself : this is all delegated
to the input completer.

5. various regtests
-------------------
to test stack traces with inlined calls, and suppressions
of (some of) these errors using inlined fn calls matching.

Work still to do:
-----------------
* improve parsing performance
* improve the memory overhead.
* handling the directory name for files of the inlined function calls is not yet done.
  (probably implies to refactor some code)
* see if m_errormgr.c *offsets arrays cannot be managed via xarray

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

11 years agoImprove performance of dwarf3 reader using a hashtable of parsed abbreviations
Philippe Waroquiers [Sun, 15 Jun 2014 10:51:14 +0000 (10:51 +0000)] 
Improve performance of dwarf3 reader using a hashtable of parsed abbreviations

For each DIE, the dwarf3 reader must know which data elements to read.
These elements are described by an abbreviation.
Re-reading these abbreviations for each DIE is costly as
the location of the needed abbreviation is found by scanning the full
abbv section, which is very costly.
(A small cache of 32 abbv offsets in the abbv section somewhat decreases
the cost, but reading the abbvs is still a hot spot, in particular for
big debug informations).

This patch:
  * adds an hash table of parsed abbreviations
  * all abbreviations for a CU are read in one single scan of the abbv
    section, when the CU header is read
So, with the patch, the di image is not accessed anymore for reading the abbvs
after the CU header parsing.

On a big executable, --read-var-info=yes user cpu changes from
  trunk:      320 seconds
to
  abbv cache: 270 seconds

This further improves on a previous (not committed) abbv cache that
was just caching up to 513 entries in the abbv pos cache and populating
the cache with an initial scan. The user cpu for this version was 285 seconds.

NB: this is some work in anticipation of a following patch that
will add reading dwarf3 inlined information, with the hope to make
this reading fast enough to activate it by default.

Note: on the examples I looked at, all abbreviations were numbered starting
from 1, with no holes. If that would always be the case, then one could use
an xarray of parsed abbreviations rather than an hash table. However,
I found nothing in the dwarf standard that guarantees that abbreviations
are numbered from 1. So, the hash table.

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

11 years agosmall improvement in x86 unwind debug tracing
Philippe Waroquiers [Sat, 14 Jun 2014 22:12:37 +0000 (22:12 +0000)] 
small improvement in x86 unwind debug tracing

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

11 years agoDo not destroy the strpool if NULL
Philippe Waroquiers [Sat, 14 Jun 2014 19:09:22 +0000 (19:09 +0000)] 
Do not destroy the strpool if NULL
It is possible that a debug info contains no string (and so strpool
is never allocated).
A protection to avoid accessing strpool was already necessary
in ML_(canonicaliseTables) :
   if (di->strpool)
      VG_(freezeDedupPA) (di->strpool);

So, if a similar debug info is released, we need the same protection
to avoid accessing a NULL strpool.

Detect by Julian on arm64, but not (at least easily) reproduced on amd64.

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

11 years agoAdd test cases for LD1R (single structure, replicate).
Julian Seward [Sat, 14 Jun 2014 18:06:14 +0000 (18:06 +0000)] 
Add test cases for LD1R (single structure, replicate).

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

11 years agodrd: Revert r14023
Bart Van Assche [Sat, 14 Jun 2014 16:39:46 +0000 (16:39 +0000)] 
drd: Revert r14023

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

11 years agodrd/tests/std_thread2: Disable this test temporarily such that the suppression patter...
Bart Van Assche [Sat, 14 Jun 2014 16:39:28 +0000 (16:39 +0000)] 
drd/tests/std_thread2: Disable this test temporarily such that the suppression patterns can be restored

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

11 years agoThis patch adds a 'de-duplicating memory pool allocator':
Philippe Waroquiers [Sat, 14 Jun 2014 16:30:09 +0000 (16:30 +0000)] 
This patch adds a 'de-duplicating memory pool allocator':
  include/pub_tool_deduppoolalloc.h
  coregrind/pub_core_deduppoolalloc.h
  coregrind/m_deduppoolalloc.c
and uses it (currently only) for the strings in m_debuginfo/storage.c
The idea is that such ddup pool allocator will also be used for other
highly duplicated information (e.g. the DiCFSI information), where
significant gains can also be achieved.
The dedup pool for strings also decreases significantly the memory
needed by the read inline information (patch still to be committed,
see bug 278972).

When testing with a big executable (tacot_process),
this reduces the size of the dinfo arena from
  trunk:  158941184/109760512  max/curr mmap'd, 156775944/107882728 max/curr,
to
  ddup:   157892608/106614784  max/curr mmap'd, 156362160/101414712 max/curr

(so 3Mb less mmap-ed once debug info is read, 1Mb less mmap-ed in peak,
6Mb less allocated once debug info is read).

This is all gained due to the string which changes from:
  trunk:   17,434,704 in       266: di.storage.addStr.1
to
  ddup:    10,966,608 in       750: di.storage.addStr.1
(6.5Mb less memory used by strings)
The gain in mmap-ed memory is smaller due to fragmentation.
Probably one could decrease the fragmentation by using bigger
size for the dedup pool, but then we would lose memory on the last
allocated pool (and for small libraries, we often do not use much
of a big pool block).
Solution might be to increase the pool size but have a "shrink_block"
operation. To be looked at in the future.

In terms of performance, startup of a big executable (on an old pentium)
is not influenced significantly (something like 0.1 seconds on 15 seconds
startup for a big executable, on a slow pentium).

The dedup pool uses a hash table. The hash function used currently
is the VG_(adler32) check sum. It is reported (and visible also here)
that this checksum is not a very good hash function (many collisions).

To have statistics about collisions, use  --stats -v -v -v

As an example of the collisions, on the strings in debug info of memcheck tool on x86,
one obtain:
   --4789-- dedupPA:di.storage.addStr.1 9983 allocs (8174 uniq) 11 pools (4820 bytes free in last pool)
   --4789-- nr occurences of chains of len N, N-plicated keys, N-plicated elts
   --4789-- N: 0 : nr chain   6975, nr keys      0, nr elts      0
   --4789-- N: 1 : nr chain   3670, nr keys   6410, nr elts   8174
   --4789-- N: 2 : nr chain   1070, nr keys    226, nr elts      0
   --4789-- N: 3 : nr chain    304, nr keys    100, nr elts      0
   --4789-- N: 4 : nr chain    104, nr keys     84, nr elts      0
   --4789-- N: 5 : nr chain     72, nr keys     42, nr elts      0
   --4789-- N: 6 : nr chain     44, nr keys     34, nr elts      0
   --4789-- N: 7 : nr chain     18, nr keys     13, nr elts      0
   --4789-- N: 8 : nr chain     17, nr keys      8, nr elts      0
   --4789-- N: 9 : nr chain      4, nr keys      6, nr elts      0
   --4789-- N:10 : nr chain      9, nr keys      4, nr elts      0
   --4789-- N:11 : nr chain      1, nr keys      0, nr elts      0
   --4789-- N:13 : nr chain      1, nr keys      1, nr elts      0
   --4789-- total nr of unique   chains:  12289, keys   6928, elts   8174
which shows that on 8174 different strings, we have only 6410 strings which have
a unique hash value. As other examples, N:13 line shows we have 13 strings
mapping to the same key. N:14 line shows we have 4 groups of 10 strings mapping to the
same key, etc.
So, adler32 is definitely a bad hash function.
Trials have been done with another hash function, giving a much lower
collision rate. So, a better (but still fast) hash function would probably
be beneficial. To be looked at ...

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

11 years agoEnhance slightly the x86 debug trace unwind code
Philippe Waroquiers [Sat, 14 Jun 2014 10:04:51 +0000 (10:04 +0000)] 
Enhance slightly the x86 debug trace unwind code

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

11 years agoFix the cleanup: line to avoid an error message in case the
Florian Krohm [Thu, 12 Jun 2014 15:37:15 +0000 (15:37 +0000)] 
Fix the cleanup: line to avoid an error message in case the
file does not exist.

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

11 years agoAdd test cases for FMUL 2d_2d_d[], 4s_4s_s[], 2s_2s_s[].
Julian Seward [Thu, 12 Jun 2014 13:16:43 +0000 (13:16 +0000)] 
Add test cases for FMUL 2d_2d_d[], 4s_4s_s[], 2s_2s_s[].

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

11 years agoAdd tests for movi_4s_#imm8,lsl8 and ushr_d_d_#imm.
Julian Seward [Thu, 12 Jun 2014 10:13:44 +0000 (10:13 +0000)] 
Add tests for movi_4s_#imm8,lsl8 and ushr_d_d_#imm.

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

11 years agoconfigure.ac: Fix Boost detection test
Bart Van Assche [Thu, 12 Jun 2014 07:45:23 +0000 (07:45 +0000)] 
configure.ac: Fix Boost detection test

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

11 years agoglibc-2.X-drd.supp: Add support for --num-callers=1
Bart Van Assche [Wed, 11 Jun 2014 06:57:02 +0000 (06:57 +0000)] 
glibc-2.X-drd.supp: Add support for --num-callers=1

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

11 years agodrd/tests/std_thread2: Make this test independent of the libstdc++ version
Bart Van Assche [Wed, 11 Jun 2014 06:39:03 +0000 (06:39 +0000)] 
drd/tests/std_thread2: Make this test independent of the libstdc++ version

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

11 years agoEnable test for movi_{16b,8b}_#imm8.
Julian Seward [Tue, 10 Jun 2014 22:53:01 +0000 (22:53 +0000)] 
Enable test for movi_{16b,8b}_#imm8.

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

11 years agoUpdate.
Julian Seward [Tue, 10 Jun 2014 12:05:33 +0000 (12:05 +0000)] 
Update.

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

11 years agodrd/tests/std_thread2: Filter out libstdc++ header file line numbers
Bart Van Assche [Tue, 10 Jun 2014 07:46:50 +0000 (07:46 +0000)] 
drd/tests/std_thread2: Filter out libstdc++ header file line numbers

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

11 years agoAvoid warnings due to implicit conversion between void*, Addr, and fn pointers
Philippe Waroquiers [Mon, 9 Jun 2014 22:08:45 +0000 (22:08 +0000)] 
Avoid warnings due to implicit conversion between void*, Addr, and fn pointers

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

11 years agoWhen enabling hostvisibility in gdbsrv, give a more user friendly
Philippe Waroquiers [Mon, 9 Jun 2014 15:47:46 +0000 (15:47 +0000)] 
When enabling hostvisibility in gdbsrv, give a more user friendly
message for the required GDB add-symbol-file command

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

11 years agodrd/tests: Update Subversion ignore list
Bart Van Assche [Mon, 9 Jun 2014 09:20:20 +0000 (09:20 +0000)] 
drd/tests: Update Subversion ignore list

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

11 years agodrd: Ignore ordering introduced by a mutex used in the thread creation wrapper
Bart Van Assche [Mon, 9 Jun 2014 09:19:26 +0000 (09:19 +0000)] 
drd: Ignore ordering introduced by a mutex used in the thread creation wrapper

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

11 years agodrd/tests/std_thread2: Add
Bart Van Assche [Mon, 9 Jun 2014 09:01:46 +0000 (09:01 +0000)] 
drd/tests/std_thread2: Add

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

11 years agodrd/tests/local_static: Disable because g++ does not yet allow proper interception...
Bart Van Assche [Mon, 9 Jun 2014 09:00:42 +0000 (09:00 +0000)] 
drd/tests/local_static: Disable because g++ does not yet allow proper interception of initialization of local static variables

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

11 years agodrd: Add __cxa_guard_*() intercepts
Bart Van Assche [Mon, 9 Jun 2014 07:55:14 +0000 (07:55 +0000)] 
drd: Add __cxa_guard_*() intercepts

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

11 years agodrd/tests/local_static: Fix a typo
Bart Van Assche [Mon, 9 Jun 2014 07:38:32 +0000 (07:38 +0000)] 
drd/tests/local_static: Fix a typo

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

11 years agodrd/tests: Update Subversion ignore list
Bart Van Assche [Mon, 9 Jun 2014 06:56:06 +0000 (06:56 +0000)] 
drd/tests: Update Subversion ignore list

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

11 years agodrd/tests/local_static: Add
Bart Van Assche [Mon, 9 Jun 2014 06:54:30 +0000 (06:54 +0000)] 
drd/tests/local_static: Add

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

11 years agogdbserver_tests: Update Subversion ignore list
Bart Van Assche [Mon, 9 Jun 2014 06:53:13 +0000 (06:53 +0000)] 
gdbserver_tests: Update Subversion ignore list

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

11 years agomemcheck/tests: Update Subversion ignore list
Bart Van Assche [Mon, 9 Jun 2014 06:52:46 +0000 (06:52 +0000)] 
memcheck/tests: Update Subversion ignore list

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

11 years agonone/tests/amd64: Update Subversion ignore list
Bart Van Assche [Mon, 9 Jun 2014 06:52:24 +0000 (06:52 +0000)] 
none/tests/amd64: Update Subversion ignore list

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

11 years agoshared: Update ignore list
Bart Van Assche [Mon, 9 Jun 2014 06:51:03 +0000 (06:51 +0000)] 
shared: Update ignore list

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

11 years agodrd manual: Fix C++11 instructions
Bart Van Assche [Sat, 7 Jun 2014 13:16:24 +0000 (13:16 +0000)] 
drd manual: Fix C++11 instructions

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

11 years agodrd/tests/std_thread: Remove two superfluous macro definitions
Bart Van Assche [Sat, 7 Jun 2014 13:13:45 +0000 (13:13 +0000)] 
drd/tests/std_thread: Remove two superfluous macro definitions

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