11193 Commits

Author SHA1 Message Date
Florian Krohm
f5e2bdbddc Change the definition of VgHashTable to not have pointer type.
This is (a) consistent with how the other containers are defined
and, more importantly, (b) allows the constification of the hash table API.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14639
2014-10-18 10:58:05 +00:00
Florian Krohm
8a96ac9cda Rewrite print_file_vars such that it does not modify its
argument string. Remove an unneeded strdup.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14638
2014-10-17 21:07:37 +00:00
Florian Krohm
84c8aaae89 Remove some dead code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14637
2014-10-17 19:44:55 +00:00
Julian Seward
70cf4709e7 _thread_suspend: hold on to the lock when suspending some other
thread, so as to not deadlock the process.

_thread_resume: add wrapper



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14636
2014-10-17 16:03:20 +00:00
Julian Seward
ccb4fc056b Add intercepts on MacOS 10.9 for
libsystem_c.dylib:strrchr
libsystem_platform.dylib:_platform_memmove$VARIANT$Ivybridge


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14635
2014-10-17 15:07:37 +00:00
Julian Seward
f015e52c05 -Wmissing-enum seems to have arrived at the MacOS builds for some
reason, and complains about missing cases in sr_isError, sr_Res,
sr_ResHI, sr_Err.  Add cases to keep it happy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14634
2014-10-17 15:05:01 +00:00
Florian Krohm
085dc9f16b Remove unused variable VG_(clo_require_text_symbol).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14633
2014-10-15 19:47:04 +00:00
Julian Seward
f26b61d67c di_notify_ACHIEVE_ACCEPT_STATE: before starting to parse the ELF file,
truncate overlaps in the DebugInfoMappings that have been collected by
the DebugInfo's FSM.  Not doing so can confuse ML_(read_elf_debug_info)'s
computation of bias values.  Observed to be a problem when reading EDIDX
sections for objects mangled by Mike Hommey's elfhack program.
See http://bugzilla.mozilla.org/show_bug.cgi?id=788974



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14632
2014-10-15 16:12:11 +00:00
Julian Seward
b96092d5df Enable sys_fadvise64_64 on arm32.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14631
2014-10-15 15:57:11 +00:00
Florian Krohm
7959068226 Merge revisions 14220, 14221, and 15629 from BUF_REMOVAL branch to trunk.
Couple of format fixes and FIXMEs for VG_(percentify).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14630
2014-10-14 21:47:43 +00:00
Florian Krohm
77c3a4ef7c Merge revisions 14210 and 14626 from the BUF_REMOVAL branch to trunk.
Change VG_(resolve_filename) to not truncate the result which is returned
in a static buffer now. Fix callsites.
Simplify VG_(di_notify_pdb_debuginfo) to use VG_(resolve_filename).
Fix VG_(readlink) prototype.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14628
2014-10-14 21:01:33 +00:00
Julian Seward
8b63b9e588 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14627
2014-10-14 20:26:45 +00:00
Florian Krohm
da32168de9 Inline function definitions must not refer to objects with internal
linkage. Remove the INLINE specifier. Related to BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14625
2014-10-13 21:00:00 +00:00
Julian Seward
5857d57571 Modify the compiler detection test so as to accept "Apple LLVM version
5.1" (etc) and identify it as a Clang variant.  Without that, it gets
misidentified as a gcc variant, which causes problems with Makefile.am's
that use the derived COMPILER_IS_CLANG conditional.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14624
2014-10-13 13:03:50 +00:00
Julian Seward
635bb7bca9 Hide .version directives in assembly code on Mac, since XCode doesn't
seem to like them.  Patch from Rhys Kidd (rhyskidd@gmail.com).
Fixes #339688.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14623
2014-10-12 17:02:55 +00:00
Julian Seward
77791188fc Fix the thread-name facility and associated test on Darwin.
Patch from Rhys Kidd (rhyskidd@gmail.com).  Fixes #339442.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14622
2014-10-12 13:47:30 +00:00
Mark Wielaard
bf28744a5f Bug 339858 arm64 dmb sy not implemented NEWS entry.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14621
2014-10-11 19:13:49 +00:00
Julian Seward
248498908e Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14620
2014-10-11 15:47:12 +00:00
Florian Krohm
1012054b60 Change eq_Invar to handle all kinds of InVars.
Move an assert to a better spot.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14619
2014-10-11 15:01:21 +00:00
Julian Seward
2476b8ff75 Handle (by ignoring) Imbe_CancelReservation. Detected by Florian
Krohm when compiling with -Wswitch-enum.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14618
2014-10-11 13:54:52 +00:00
Mark Wielaard
b57b59207f Bug 339855 arm64 unhandled getsid/setsid syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14617
2014-10-10 21:33:39 +00:00
Mark Wielaard
139476d494 Bug 339853 arm64 times syscall unknown.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14616
2014-10-10 21:13:28 +00:00
Florian Krohm
24d18a35cf Forgotten mergeinfo update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14615
2014-10-09 19:28:30 +00:00
Florian Krohm
15ddd0c0d9 Merge revisions 14213 and 14612 from the BUF_REMOVAL branch to trunk.
The change removes the PATH_MAX limitation from the linux launcher.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14614
2014-10-09 19:22:44 +00:00
Florian Krohm
cb8c5e3d1f Use __typeof__.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14613
2014-10-09 16:44:30 +00:00
Philippe Waroquiers
800a64895b Add two gnu extensions DW_AT definition and tracing
(no functional changes, except that these values will be visible
in the dwarf trace, instead of DW_AT_???)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14611
2014-10-07 21:25:36 +00:00
Philippe Waroquiers
2e547da1ca follow up to fix for 339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
The fix committed in revision 14603 is properly fixing the bug 339721.
However, when enabling the dwarf tracing, the DW_FORM_ref_sig8 causes
a segmentation violation, as the tracing code is shared with the
reading code. But the DW_FORM_ref_sig8 reading code is dereferencing
some data structure that is only initialised when --read-var-info=yes.

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



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14610
2014-10-07 20:35:06 +00:00
Florian Krohm
97dc435677 Merge revisions 14372 and 14607 from the BUF_REMOVAL branch to trunk.
This change makes VG_(clo_suppressions), VG_(clo_fullpath_after),
and VG_(clo_req_tsyms) XArrays. They used to be arrays of fixed size.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14609
2014-10-07 18:36:28 +00:00
Florian Krohm
2941478e87 Update mergeinfo. r14606 wasn't a proper svn merge. It was just an
applied patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14608
2014-10-07 17:58:42 +00:00
Florian Krohm
5929994d48 Merge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
The change eliminates the fixed size buffers in gen_suppression and
show_used_suppressions. This is achieved by changing the return type from
VG_TDICT_CALL(tool_get_extra_suppression_info and
VG_TDICT_CALL(tool_print_extra_suppression_use from Bool to SizeT.
A return value of 0 indicates that nothing (except the terminating '\0'
which is always inserted) was written to the buffer. This corresponds to the
previous False return value. A return value which is equal to the buffer
size (that was passed in as function argument) indicates that the buffer was
not large enough. The caller then resizes the buffer and retries.
Otherwise, the buffer was large enough.
Regtested with a resize value of 1.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14606
2014-10-07 14:28:52 +00:00
Philippe Waroquiers
fe265a392f Indicate the fix for 339721 is only partial
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14605
2014-10-06 21:55:00 +00:00
Philippe Waroquiers
623a54340e fix 339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
The skip code was wrongly skipping 16 bytes, while only 8 are read
for a DW_FORM_ref_sig8.

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

It can manifest itself with other symptoms:

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

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




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14603
2014-10-06 21:46:43 +00:00
Florian Krohm
2891e3ceaa Followup to r14600. Copy the contents of pub_core_guest.h to pub_tool_guest.h
to make it available to tools. This allows to remove quite a bit of
ifdeffery from memcheck's mc_machine.c


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14601
2014-10-06 21:04:14 +00:00
Florian Krohm
9eb0cdb015 Entangle header files a bit. Specifically, pub_core_basics.h no longer
includes libvex.h. It isn't needed to successfully compile pub_core_basics.h
standalone and the declarations libvex.h provides aren't used as broadly as
the comment in the code implied. 
Move the guest-specific includes and some ifdeffery to the new file
pub_core_guest.h
For the curious reader: The change above avoids a problem when linking the
linux-launcher which previously included libvex.h indirectly. libvex.h also
defines the inline function LibVEX_Alloc which, when emitted, causes the
link step to fail due to unresoled references (as the launcher does not link
against libvex.a). See also BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14600
2014-10-06 16:41:14 +00:00
Florian Krohm
5658acec7e Use correct tag names in sys_getdents/64 wrappers.
Patch by Ivo Raisr (ivosh@ivosh.net).
Fixes BZ #339645


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14599
2014-10-04 21:32:06 +00:00
Florian Krohm
1af502ff14 The XArray element type of variable "described" is HChar not UChar.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14598
2014-10-04 21:08:42 +00:00
Florian Krohm
3065f2e199 Merge revisions 14337, 14596 from the BUF_REMOVAL branch to trunk.
Change callgrind's init_cmdbuf function to allocate a large enough
buffer for the command line.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14597
2014-10-01 14:16:05 +00:00
Florian Krohm
cd357d71b4 Merge six easy pieces from the BUF_REMOVAL branch:
r14271  Audit a few buffer sizes, increase one.
r14280  Audit buffer size.
r14296  Remove a few unneeded header files.
r14310  Replace fixed size buffers with a large enough buffers.
r14338  Remove a dead assignment in print_bbcs and make global variable
        print_fd a local variable.
r14359  Remove a benign macro redefinition in cachegrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14595
2014-09-30 22:15:05 +00:00
Florian Krohm
b641262cb8 Merge revisions 14216,14591,14593 from the BUF_REMOVAL branch to trunk.
Chang the semantics of VG_(getgroups) to support querying the number
of supplementary group IDs which simplifies obtaining them and gets
rid of fixed size buffers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14594
2014-09-30 19:26:58 +00:00
Julian Seward
81fb4ba387 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14592
2014-09-30 12:48:02 +00:00
Carl Love
460a76b82a Add entry to NEWS file for fixed bugzilla 339433
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14590
2014-09-29 19:41:11 +00:00
Carl Love
8ebec45281 Add entry to NEWS file for fixed bugzilla 339182
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14589
2014-09-29 18:28:33 +00:00
Florian Krohm
e52ad4cb36 Merge r14125 from the BUF_REMOVAL branch to trunk.
This change eliminates the fixed size buffer in VG_(assert_fail).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14588
2014-09-28 21:35:07 +00:00
Florian Krohm
4ec9cf0b9d Merge revisions 14212 and 14586 from the BUF_REMOVAL branch to trunk.
The change eliminates the use of fixed size buffers for path names.
There was a comment in the code that dynamic memory allocation could
not be used. But that is no longer true. 
Clean up #includes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14587
2014-09-28 21:22:26 +00:00
Bart Van Assche
0b849cee4d drd/tests/std_thread2.supp: Add a suppression pattern
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14585
2014-09-28 18:28:18 +00:00
Philippe Waroquiers
2d86346244 Fix VG_(snprintf) missing arg in inner setup
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14584
2014-09-28 16:13:09 +00:00
Florian Krohm
532dc90dbd Merge r14229 from the BUF_REMOVAL branch to trunk.
Function MC_(snprintf_delta) requires a buffer of size 31 or larger to
avoid overflow.Add an assert, change and document the buffer size and
fix all call sites. Remove magic constants along the way.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14583
2014-09-28 13:29:06 +00:00
Florian Krohm
68e0108e02 Merge r14251 from BUF_REMOVAL branch to trunk.
This change eliminates the fixed size buffer when reading /proc/version.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14582
2014-09-28 09:08:59 +00:00
Florian Krohm
1c6c4ff94e Merge r14209 from BUF_REMOVAL branch to trunk.
In VG_(redir_notify_new_DebugInfo) use a large enough buffer
allocated on the stack.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14581
2014-09-27 18:47:07 +00:00
Florian Krohm
9a406c8279 Merge r14208 from BUF_REMOVAL branch to trunk.
In function read_dot_valgrindrc use a large enough buffer 
allocated on the stack. 
Also assert that the passed in directory is not NULL. This is 
true at all call sites. The old code would have attempted to read
/.valgrindrc for dir == NULL and I don't think we want that.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14580
2014-09-27 18:01:19 +00:00