10762 Commits

Author SHA1 Message Date
Tom Hughes
5f4dbbeb75 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
2014-06-26 11:29:05 +00:00
Tom Hughes
ba3d08c7a7 Handle the CDROM_DISC_STATUS ioctl.
Patch from Daniel Kamil Kozar via BZ#333788.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14106
2014-06-26 11:11:56 +00:00
Tom Hughes
d2201dd27f Remove bug closed by reporter
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14105
2014-06-26 11:07:42 +00:00
Tom Hughes
8c9c829f4c Add support for TIOCNOTTY ioctl. BZ#331476.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14104
2014-06-26 11:03:32 +00:00
Julian Seward
3622799156 Track vex r2890 (renaming of vector subparts-of-lanes-reversal IROps)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14103
2014-06-26 10:51:03 +00:00
Julian Seward
e7e49c4d77 Track vex r2889 (rename vector Cls/Clz primops)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14102
2014-06-26 08:22:01 +00:00
Philippe Waroquiers
f96b38bf1d 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
2014-06-25 23:27:08 +00:00
Julian Seward
bba67b9bb7 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
2014-06-25 11:24:16 +00:00
Julian Seward
9784fb846c Intercept libsystem_platform.dylib:_platform_strncmp and dyld:memchr
on OSX 10.9.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14099
2014-06-25 11:17:46 +00:00
Julian Seward
40aec33a4d Update suppressions for OSX 10.9 (64-bit)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14098
2014-06-25 11:15:51 +00:00
Philippe Waroquiers
1b7ad6225a 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
2014-06-24 22:13:43 +00:00
Philippe Waroquiers
def4ce5ed6 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
2014-06-24 21:08:44 +00:00
Philippe Waroquiers
f181d9b03a 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
2014-06-24 20:48:25 +00:00
Florian Krohm
5061fe24ec 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
2014-06-24 15:33:53 +00:00
Florian Krohm
d7cccf3f9f Make error message more precise.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14093
2014-06-24 13:08:44 +00:00
Florian Krohm
a4923d3057 Suppress a clang warning about an uninitialised variable.
Fixes BZ #329694.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14092
2014-06-24 11:35:45 +00:00
Bart Van Assche
9578661efa helgrind/tests/tc20_verifywrap: Port to glibc >= 2.18
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14091
2014-06-24 05:12:43 +00:00
Bart Van Assche
9214c37d49 Rename --defaultsupp into --default-suppressions as requested by Julian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14090
2014-06-24 05:08:21 +00:00
Florian Krohm
9700389dd9 Document return value of VALGRIND_MAKE_MEM_DEFINED and friends.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14089
2014-06-23 21:23:44 +00:00
Florian Krohm
8f46d5fb35 BZ 330257 has been fixed in r14055.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14088
2014-06-23 19:43:32 +00:00
Florian Krohm
7aefdaa6ef 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
2014-06-23 19:33:45 +00:00
Julian Seward
3534b0f75d OS X 10.9: Add redirections for strnlen, strcpy, strncpy,
platform_memchr, _platform_memcmp.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14086
2014-06-23 16:03:45 +00:00
Julian Seward
8c7929901d * 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
2014-06-23 16:02:04 +00:00
Julian Seward
a4d26867db Wrap long lines in kernelrpc_mach_* PRE/POST handlers. No functional
change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14084
2014-06-23 13:09:38 +00:00
Julian Seward
5f9fc28e82 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
2014-06-23 09:10:20 +00:00
Bart Van Assche
44c59fd7ea Make none/tests/cmdline[12] pass again
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14082
2014-06-22 11:13:47 +00:00
Bart Van Assche
7f0e2c91ae drd/tests/std_thread2: Re-enable
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14081
2014-06-22 10:13:47 +00:00
Bart Van Assche
4b6bd7b0fc core: Add command-line option --defaultsupp
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14080
2014-06-22 10:11:59 +00:00
Florian Krohm
8d00fd3184 Add Iop_Abs64x2; unbreak build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14079
2014-06-22 07:35:03 +00:00
Florian Krohm
1683567cc2 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14078
2014-06-21 21:03:48 +00:00
Florian Krohm
31caca50d5 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
2014-06-21 20:25:30 +00:00
Philippe Waroquiers
a2ea737046 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
2014-06-21 12:41:48 +00:00
Philippe Waroquiers
cdfd3be6b7 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
2014-06-21 10:57:33 +00:00
Philippe Waroquiers
083986d244 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
2014-06-21 09:48:17 +00:00
Julian Seward
8f5dd4219c 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
2014-06-21 09:40:19 +00:00
Julian Seward
1a105d5599 Whitespace and comment-only changes. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14072
2014-06-21 09:37:46 +00:00
Julian Seward
33053e3468 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
2014-06-21 09:36:19 +00:00
Julian Seward
2db4102096 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
2014-06-21 09:34:22 +00:00
Florian Krohm
8db939e065 Fix a few Char / HChar mixups.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14069
2014-06-20 21:47:41 +00:00
Julian Seward
d0744f50ee Fix a missing-prototype warning on OS X 10.7.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14068
2014-06-20 15:30:18 +00:00
Julian Seward
fd31a6732d Mark unused functions as unused, to keep Clang happy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14067
2014-06-20 14:25:53 +00:00
Julian Seward
36c6dd0fa0 Remove unused function swapfunc().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14066
2014-06-20 14:17:09 +00:00
Julian Seward
6c5ffe49d5 Remove fd_exists(), as it is never used.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14065
2014-06-20 14:14:59 +00:00
Julian Seward
93dcc9d5f8 Fix incorrect header guard macro, as awesomely detected by clang.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14064
2014-06-20 14:11:27 +00:00
Julian Seward
7e9c5b87dd Fix a -Wshadow warning from some oldish version of XCode.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14063
2014-06-20 14:07:38 +00:00
Julian Seward
7d0984bf06 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
2014-06-20 13:38:04 +00:00
Julian Seward
cbcf967174 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
2014-06-20 13:29:31 +00:00
Julian Seward
9fb50b29dd 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
2014-06-20 13:22:57 +00:00
Julian Seward
d651963d52 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
2014-06-20 13:13:57 +00:00
Julian Seward
c3d19bad2e 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
2014-06-20 13:08:51 +00:00