]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
10 years agoMerge revisions 14356-14358 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Mon, 27 Oct 2014 22:03:47 +0000 (22:03 +0000)] 
Merge revisions 14356-14358 from the BUF_REMOVAL branch to trunk.
Rewrite cg_merge.c to avoid fixed size arrays.

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

10 years agoMerge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Mon, 27 Oct 2014 12:06:35 +0000 (12:06 +0000)] 
Merge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.
The functions VG_(get_filename) and VG_(get_filename_lineno) now return
a pointer to filename and directory name instead of copying them into
buffers passed in from the caller.
The returned strings are persistent as long as the DebugInfo to which
they belong is not discarded. The caller therefore needs to stash them
away as needed.
Function VG_(strncpy_safely) has been removed as it is no longer needed.

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

10 years agoEnable test cases for
Julian Seward [Mon, 27 Oct 2014 09:35:12 +0000 (09:35 +0000)] 
Enable test cases for

LD1/ST1 (multiple 1-elem structs to/from 2 regs
LD1/ST1 (multiple 1-elem structs to/from 3 regs
LD1/ST1 (multiple 1-elem structs to/from 4 regs
LD1R (single structure, replicate)
LD2R (single structure, replicate)
LD3R (single structure, replicate)
LD4R (single structure, replicate)
LD1/ST1 (single structure, to/from one lane)
LD2/ST2 (single structure, to/from one lane)
LD3/ST3 (single structure, to/from one lane)
LD4/ST4 (single structure, to/from one lane)

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

10 years agoMerge r14289 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 26 Oct 2014 19:16:14 +0000 (19:16 +0000)] 
Merge r14289 from the BUF_REMOVAL branch to trunk.
Change CLG_(get_debug_info) to not build up an absolute pathname in its
'file' parameter. Instead give it an additional parameter to hold the
directory name. Callers can then build up the absolute pathname if needed.
This change will come in handy soonish when VG_(get_filename_lineno) will be
changed and those buffers will disappear.
The change has a bit of ripple to get_fn_node_inseg and CLG_(get_file_node).

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

10 years agoMerge r14288 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 26 Oct 2014 17:12:12 +0000 (17:12 +0000)] 
Merge r14288 from the BUF_REMOVAL branch to trunk.
What it does it changing cachegrind's get_debug_info function such
that it no longer builds up an absolute pathname. Instead the function
get an additional parameter for the directory name and the absolute
pathname is built when it is needed. This will come in handy soonish
when VG_(get_filename_lineno) will be changed and those buffers will
disappear.

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

10 years agoMerge r14202 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 25 Oct 2014 19:20:38 +0000 (19:20 +0000)] 
Merge r14202 from the BUF_REMOVAL branch to trunk.
This patch changes the interface and behaviour of VG_(demangle) and
VG_(maybe_Z_demangle). Instead of copying the demangled name into a
fixed sized buffer that is passed in from the caller (HChar *buf, Int n_buf),
the demangling functions will now return a pointer to the full-length
demangled name (HChar **result). It is the caller's responsiblilty to
make a copy if needed.

This change in function parameters ripples upward
- first: to get_sym_name
- then to the convenience wrappers
  - VG_(get_fnname)
  - VG_(get_fnname_w_offset)
  - VG_(get_fnname_if_entry)
  - VG_(get_fnname_raw)
  - VG_(get_fnname_no_cxx_demangle)
  - VG_(get_datasym_and_offset)

The changes in foComplete then forces the arguments of
  - VG_(get_objname) to be changed as well

There are some issues regarding the ownership and persistence of
character strings to consider.
In general, the returned character string is owned by "somebody else"
which means the caller must not free it. Also, the caller must not
modify the returned string as it possibly points to read only memory.
Additionally, the returned string is not necessarily persistent. Here are
the scenarios:
- the returned string is a demangled function name in which case the
  memory holding the string will be freed when the demangler is called again.
- the returned string hangs off of a DebugInfo structure in which case
  it will be freed when the DebugInfo is discarded
- the returned string hangs off of a segment in the address space manager
  in which case it may be overwritten when the segment is merged with
  another segment
So the rule of thunb here is: if in doubt strdup the string.

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

10 years agoUse AC_GCC_WARNING_COND to figure out whether the compiler
Florian Krohm [Fri, 24 Oct 2014 07:42:19 +0000 (07:42 +0000)] 
Use AC_GCC_WARNING_COND to figure out whether the compiler
supports -Wcast-qual.

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

10 years agoAdd --resync-filter to the --help output.
Julian Seward [Thu, 23 Oct 2014 21:49:58 +0000 (21:49 +0000)] 
Add --resync-filter to the --help output.

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

10 years agoDarwin only: add a filter mechanism that aims to remove pointless
Julian Seward [Thu, 23 Oct 2014 19:48:01 +0000 (19:48 +0000)] 
Darwin only: add a filter mechanism that aims to remove pointless
memory-map resync operations.  Without the filter, such operations
come to dominate the running time of complex apps with thousands of
memory segments (eg Firefox) and it becomes unusably slow.  With
the filter in place, the huge performance loss is mostly avoided.

Has no meaning and no effect on non-Darwin targets.  Controlled by
flag --resync-filter=no|yes|verbose [yes].  Filter is currently only
set up for Mac OS X 10.9 (Mavericks) 64 bit and will not produce
any performance benefit on any other configuration.

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

10 years agoEnable reading of Dwarf2 frame-unwind info on MacOS. It seems
Julian Seward [Thu, 23 Oct 2014 19:44:21 +0000 (19:44 +0000)] 
Enable reading of Dwarf2 frame-unwind info on MacOS.  It seems
as if more recent XCodes rely on it.

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

10 years ago2 pints later: more coregrind constification.
Florian Krohm [Thu, 23 Oct 2014 17:47:15 +0000 (17:47 +0000)] 
2 pints later: more coregrind constification.

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

10 years agoAdd a bit of casting to avoid a compiler warning following recent
Julian Seward [Thu, 23 Oct 2014 14:14:49 +0000 (14:14 +0000)] 
Add a bit of casting to avoid a compiler warning following recent
const-ification.

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

10 years agoFollowup to r14656. Fix compile problem on Darwin.
Florian Krohm [Thu, 23 Oct 2014 11:38:12 +0000 (11:38 +0000)] 
Followup to r14656. Fix compile problem on Darwin.
Patch by Rhys Kidd <rhyskidd@gmail.com>.

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

10 years agoConstify coregrind.
Florian Krohm [Wed, 22 Oct 2014 22:25:30 +0000 (22:25 +0000)] 
Constify coregrind.

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

10 years agoConstify a variable.
Florian Krohm [Wed, 22 Oct 2014 20:35:27 +0000 (20:35 +0000)] 
Constify a variable.

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

10 years agoChange VG_(allocEltDedupPA) to return a pointer to const. The reason is
Florian Krohm [Wed, 22 Oct 2014 17:42:37 +0000 (17:42 +0000)] 
Change VG_(allocEltDedupPA) to return a pointer to const. The reason is
that once an element has been allocated and added to the pool it must
not be modified afterwards. See the documentation in pub_tool_deduppoolalloc.h
The rest of the patch is ripple.

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

10 years agoAdd test cases for all known arm64 load/store instructions.
Julian Seward [Wed, 22 Oct 2014 13:47:07 +0000 (13:47 +0000)] 
Add test cases for all known arm64 load/store instructions.

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

10 years agoEnable -Wcast-qual when compiling the valgrind source.
Florian Krohm [Wed, 22 Oct 2014 12:53:16 +0000 (12:53 +0000)] 
Enable -Wcast-qual when compiling the valgrind source.
Testcases are not compiled with -Wcast-qual.
Introduce CONST_CAST macro to work around in the few spots
where a cast that drops type qualifiers is needed.

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

10 years agoChange the return type of the replacement function for rawmemchr
Florian Krohm [Wed, 22 Oct 2014 12:06:22 +0000 (12:06 +0000)] 
Change the return type of the replacement function for rawmemchr
to match that of glibc's rawmemchr.

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

10 years agoChange the initialisation of the newly allocated struct sched_lock
Florian Krohm [Wed, 22 Oct 2014 09:44:34 +0000 (09:44 +0000)] 
Change the initialisation of the newly allocated struct sched_lock
object. Just memset the whole thing to 0. That avoids a cast that
drops type qualifiction.

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

10 years agoFollowup to r14646. The symbol TIOCSIG is not necessarily defined,
Florian Krohm [Wed, 22 Oct 2014 09:25:03 +0000 (09:25 +0000)] 
Followup to r14646. The symbol TIOCSIG is not necessarily defined,
e.g. on s390x with glibc 2.3.4. Modify the testcase to bypass the ioctl
call in that case.

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

10 years agoUpdate list of ignored files.
Florian Krohm [Wed, 22 Oct 2014 09:19:12 +0000 (09:19 +0000)] 
Update list of ignored files.

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

10 years agoRewritten to avoid cast that drops const qualification.
Florian Krohm [Tue, 21 Oct 2014 17:15:14 +0000 (17:15 +0000)] 
Rewritten to avoid cast that drops const qualification.

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

10 years agoAdd support for ioctl(fd, TIOCSIG, signal_number) which used
Florian Krohm [Tue, 21 Oct 2014 07:20:20 +0000 (07:20 +0000)] 
Add support for ioctl(fd, TIOCSIG, signal_number) which used
to issue a false complaint. Fixes BZ #339706
Source patch by David Herrmann (dh.herrmann@gmail.com).
Testcase by myself.

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

10 years agoFix BZ 339789. /bin/true does not exist on Darwin.
Florian Krohm [Mon, 20 Oct 2014 21:29:26 +0000 (21:29 +0000)] 
Fix BZ 339789.  /bin/true does not exist on Darwin.
Patch by rhyskidd@gmail.com.

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

10 years agoFix the prerequisite of the none/tests/rlimit64_nofile testcase.
Florian Krohm [Mon, 20 Oct 2014 21:15:31 +0000 (21:15 +0000)] 
Fix the prerequisite of the none/tests/rlimit64_nofile testcase.
Patch by rhyskidd@gmail.com. Fixes BZ 339808.

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

10 years agoFix some testcases which implicitly assumed that TMPDIR was either
Florian Krohm [Mon, 20 Oct 2014 20:59:13 +0000 (20:59 +0000)] 
Fix some testcases which implicitly assumed that TMPDIR was either
not set or set to /tmp   This is not always true. Fixes BZ 340115.
Patch by rhyskidd@gmail.com.

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

10 years agoConstify the tool interface.
Florian Krohm [Mon, 20 Oct 2014 19:02:38 +0000 (19:02 +0000)] 
Constify the tool interface.

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

10 years agoConstify.
Florian Krohm [Sat, 18 Oct 2014 20:56:13 +0000 (20:56 +0000)] 
Constify.

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

10 years agoConstify m_oset, m_sparsewa, and m_wordfm.
Florian Krohm [Sat, 18 Oct 2014 16:17:13 +0000 (16:17 +0000)] 
Constify m_oset, m_sparsewa, and m_wordfm.

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

10 years agoChange the definition of VgHashTable to not have pointer type.
Florian Krohm [Sat, 18 Oct 2014 10:58:05 +0000 (10:58 +0000)] 
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

10 years agoRewrite print_file_vars such that it does not modify its
Florian Krohm [Fri, 17 Oct 2014 21:07:37 +0000 (21:07 +0000)] 
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

10 years agoRemove some dead code.
Florian Krohm [Fri, 17 Oct 2014 19:44:55 +0000 (19:44 +0000)] 
Remove some dead code.

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

10 years ago_thread_suspend: hold on to the lock when suspending some other
Julian Seward [Fri, 17 Oct 2014 16:03:20 +0000 (16:03 +0000)] 
_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

10 years agoAdd intercepts on MacOS 10.9 for
Julian Seward [Fri, 17 Oct 2014 15:07:37 +0000 (15:07 +0000)] 
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

10 years ago-Wmissing-enum seems to have arrived at the MacOS builds for some
Julian Seward [Fri, 17 Oct 2014 15:05:01 +0000 (15:05 +0000)] 
-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

10 years agoRemove unused variable VG_(clo_require_text_symbol).
Florian Krohm [Wed, 15 Oct 2014 19:47:04 +0000 (19:47 +0000)] 
Remove unused variable VG_(clo_require_text_symbol).

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

10 years agodi_notify_ACHIEVE_ACCEPT_STATE: before starting to parse the ELF file,
Julian Seward [Wed, 15 Oct 2014 16:12:11 +0000 (16:12 +0000)] 
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

10 years agoEnable sys_fadvise64_64 on arm32.
Julian Seward [Wed, 15 Oct 2014 15:57:11 +0000 (15:57 +0000)] 
Enable sys_fadvise64_64 on arm32.

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

10 years agoMerge revisions 14220, 14221, and 15629 from BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 14 Oct 2014 21:47:43 +0000 (21:47 +0000)] 
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

10 years agoMerge revisions 14210 and 14626 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 14 Oct 2014 21:01:33 +0000 (21:01 +0000)] 
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

10 years agoUpdate.
Julian Seward [Tue, 14 Oct 2014 20:26:45 +0000 (20:26 +0000)] 
Update.

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

10 years agoInline function definitions must not refer to objects with internal
Florian Krohm [Mon, 13 Oct 2014 21:00:00 +0000 (21:00 +0000)] 
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

10 years agoModify the compiler detection test so as to accept "Apple LLVM version
Julian Seward [Mon, 13 Oct 2014 13:03:50 +0000 (13:03 +0000)] 
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

10 years agoHide .version directives in assembly code on Mac, since XCode doesn't
Julian Seward [Sun, 12 Oct 2014 17:02:55 +0000 (17:02 +0000)] 
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

10 years agoFix the thread-name facility and associated test on Darwin.
Julian Seward [Sun, 12 Oct 2014 13:47:30 +0000 (13:47 +0000)] 
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

10 years agoBug 339858 arm64 dmb sy not implemented NEWS entry.
Mark Wielaard [Sat, 11 Oct 2014 19:13:49 +0000 (19:13 +0000)] 
Bug 339858 arm64 dmb sy not implemented NEWS entry.

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

10 years agoUpdate.
Julian Seward [Sat, 11 Oct 2014 15:47:12 +0000 (15:47 +0000)] 
Update.

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

10 years agoChange eq_Invar to handle all kinds of InVars.
Florian Krohm [Sat, 11 Oct 2014 15:01:21 +0000 (15:01 +0000)] 
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

10 years agoHandle (by ignoring) Imbe_CancelReservation. Detected by Florian
Julian Seward [Sat, 11 Oct 2014 13:54:52 +0000 (13:54 +0000)] 
Handle (by ignoring) Imbe_CancelReservation.  Detected by Florian
Krohm when compiling with -Wswitch-enum.

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

10 years agoBug 339855 arm64 unhandled getsid/setsid syscalls.
Mark Wielaard [Fri, 10 Oct 2014 21:33:39 +0000 (21:33 +0000)] 
Bug 339855 arm64 unhandled getsid/setsid syscalls.

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

10 years agoBug 339853 arm64 times syscall unknown.
Mark Wielaard [Fri, 10 Oct 2014 21:13:28 +0000 (21:13 +0000)] 
Bug 339853 arm64 times syscall unknown.

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

10 years agoForgotten mergeinfo update.
Florian Krohm [Thu, 9 Oct 2014 19:28:30 +0000 (19:28 +0000)] 
Forgotten mergeinfo update.

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

10 years agoMerge revisions 14213 and 14612 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 9 Oct 2014 19:22:44 +0000 (19:22 +0000)] 
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

10 years agoUse __typeof__.
Florian Krohm [Thu, 9 Oct 2014 16:44:30 +0000 (16:44 +0000)] 
Use __typeof__.

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

10 years agoAdd two gnu extensions DW_AT definition and tracing
Philippe Waroquiers [Tue, 7 Oct 2014 21:25:36 +0000 (21:25 +0000)] 
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

10 years agofollow up to fix for 339721 assertion 'check_sibling == sibling' failed in readdwarf3...
Philippe Waroquiers [Tue, 7 Oct 2014 20:35:06 +0000 (20:35 +0000)] 
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

10 years agoMerge revisions 14372 and 14607 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 7 Oct 2014 18:36:28 +0000 (18:36 +0000)] 
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

10 years agoUpdate mergeinfo. r14606 wasn't a proper svn merge. It was just an
Florian Krohm [Tue, 7 Oct 2014 17:58:42 +0000 (17:58 +0000)] 
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

10 years agoMerge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 7 Oct 2014 14:28:52 +0000 (14:28 +0000)] 
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

10 years agoIndicate the fix for 339721 is only partial
Philippe Waroquiers [Mon, 6 Oct 2014 21:55:00 +0000 (21:55 +0000)] 
Indicate the fix for 339721 is only partial

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

10 years agofix 339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
Philippe Waroquiers [Mon, 6 Oct 2014 21:46:43 +0000 (21:46 +0000)] 
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

10 years agoFollowup to r14600. Copy the contents of pub_core_guest.h to pub_tool_guest.h
Florian Krohm [Mon, 6 Oct 2014 21:04:14 +0000 (21:04 +0000)] 
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

10 years agoEntangle header files a bit. Specifically, pub_core_basics.h no longer
Florian Krohm [Mon, 6 Oct 2014 16:41:14 +0000 (16:41 +0000)] 
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

10 years agoUse correct tag names in sys_getdents/64 wrappers.
Florian Krohm [Sat, 4 Oct 2014 21:32:06 +0000 (21:32 +0000)] 
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

10 years agoThe XArray element type of variable "described" is HChar not UChar.
Florian Krohm [Sat, 4 Oct 2014 21:08:42 +0000 (21:08 +0000)] 
The XArray element type of variable "described" is HChar not UChar.

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

10 years agoMerge revisions 14337, 14596 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Wed, 1 Oct 2014 14:16:05 +0000 (14:16 +0000)] 
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

10 years agoMerge six easy pieces from the BUF_REMOVAL branch:
Florian Krohm [Tue, 30 Sep 2014 22:15:05 +0000 (22:15 +0000)] 
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

10 years agoMerge revisions 14216,14591,14593 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 30 Sep 2014 19:26:58 +0000 (19:26 +0000)] 
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

10 years agoUpdate.
Julian Seward [Tue, 30 Sep 2014 12:48:02 +0000 (12:48 +0000)] 
Update.

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

10 years agoAdd entry to NEWS file for fixed bugzilla 339433
Carl Love [Mon, 29 Sep 2014 19:41:11 +0000 (19:41 +0000)] 
Add entry to NEWS file for fixed bugzilla 339433

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

10 years agoAdd entry to NEWS file for fixed bugzilla 339182
Carl Love [Mon, 29 Sep 2014 18:28:33 +0000 (18:28 +0000)] 
Add entry to NEWS file for fixed bugzilla 339182

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

10 years agoMerge r14125 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 21:35:07 +0000 (21:35 +0000)] 
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

10 years agoMerge revisions 14212 and 14586 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 21:22:26 +0000 (21:22 +0000)] 
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

10 years agodrd/tests/std_thread2.supp: Add a suppression pattern
Bart Van Assche [Sun, 28 Sep 2014 18:28:18 +0000 (18:28 +0000)] 
drd/tests/std_thread2.supp: Add a suppression pattern

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

10 years agoFix VG_(snprintf) missing arg in inner setup
Philippe Waroquiers [Sun, 28 Sep 2014 16:13:09 +0000 (16:13 +0000)] 
Fix VG_(snprintf) missing arg in inner setup

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

10 years agoMerge r14229 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 13:29:06 +0000 (13:29 +0000)] 
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

10 years agoMerge r14251 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 28 Sep 2014 09:08:59 +0000 (09:08 +0000)] 
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

10 years agoMerge r14209 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 27 Sep 2014 18:47:07 +0000 (18:47 +0000)] 
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

10 years agoMerge r14208 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 27 Sep 2014 18:01:19 +0000 (18:01 +0000)] 
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

10 years agoMerge 14206,14207,14261,14577,14578 from BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 27 Sep 2014 17:42:07 +0000 (17:42 +0000)] 
Merge 14206,14207,14261,14577,14578 from BUF_REMOVAL branch to trunk.
This changes VG_(record_startup_wd) to dynamically allocate a large
enough buffer for the directory name. As the dynamic memory manager has
started up a while ago, this is quite safe. Also rewrite VG_(get_startup_wd)
to simply return the directory name. No more messing with copying it
around. Adapt call sites.

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

10 years agoMerge revisions 14203,14574,14575 from the BUF_REMOVAL
Florian Krohm [Sat, 27 Sep 2014 13:29:09 +0000 (13:29 +0000)] 
Merge revisions 14203,14574,14575 from the BUF_REMOVAL
branch to trunk.
This change eliminates the fixed size buffers in VG_(basename)
and VG_(dirname).

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

10 years agoRemove unneeded header file which does not exist on Darwin.
Florian Krohm [Sat, 27 Sep 2014 11:36:08 +0000 (11:36 +0000)] 
Remove unneeded header file which does not exist on Darwin.
Disable test for darwin as pthread_setname_np is not implemented.
But setting and observing the threadname is what this test is all about.

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

10 years agomips64: enable soft-float build of the tests
Petar Jovanovic [Sat, 27 Sep 2014 05:40:33 +0000 (05:40 +0000)] 
mips64: enable soft-float build of the tests

Cavium toolchain defaults to soft-float, so it is important to enable full
build of the test suite to work in that case as well.

This boils down to protecting FPU-specific code segments with

#if defined(__mips_hard_float)
#endif

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

10 years agomips64: run FPU tests only when FPU is available
Petar Jovanovic [Sat, 27 Sep 2014 05:33:07 +0000 (05:33 +0000)] 
mips64: run FPU tests only when FPU is available

Check whether the target platform is meant to have an FPU before executing
tests that make use of a floating-point unit.

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

10 years agomips: extend mips_features with a check for FPU
Petar Jovanovic [Sat, 27 Sep 2014 05:18:21 +0000 (05:18 +0000)] 
mips: extend mips_features with a check for FPU

Extend mips_features with "hard-float" query to which mips_features will
respond whether or not the platform is meant to have a floating point unit.
The query is not a runtime check, but a built-time check.

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

10 years agoimplement KVM_KVMCLOCK_CTRL. Interestingly, the kernel does not check
Christian Borntraeger [Fri, 26 Sep 2014 18:44:40 +0000 (18:44 +0000)] 
implement KVM_KVMCLOCK_CTRL. Interestingly, the kernel does not check
the parameter. QEMU does pass 0 nevertheless as parameter.

bugzilla:  [Bug 339424] Full support of KVM ioctl

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

10 years agoprovide ioctl handlers for KVM_SET_TSS_ADDR.
Christian Borntraeger [Fri, 26 Sep 2014 12:25:02 +0000 (12:25 +0000)] 
provide ioctl handlers for KVM_SET_TSS_ADDR.
part of bugzilla 339424

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

10 years agoThe testbuckets none/tests/ppc{32,64} did not build in case the
Florian Krohm [Wed, 24 Sep 2014 22:02:54 +0000 (22:02 +0000)] 
The testbuckets none/tests/ppc{32,64} did not build in case the
toolchain did not support -maltivec -mabi=altivec.
This should work now. Fixes BZ #338731

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

10 years agoGlibc versions prior to 2.5 do not define PTRACE_GETSIGINFO
Florian Krohm [Wed, 24 Sep 2014 19:13:01 +0000 (19:13 +0000)] 
Glibc versions prior to 2.5 do not define PTRACE_GETSIGINFO
(determined by Patrick J. LoPresti).
Tweak the ifdeffery.

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

10 years agoRipple from constifying parameters of instrumentation functions and
Florian Krohm [Wed, 24 Sep 2014 12:06:55 +0000 (12:06 +0000)] 
Ripple from constifying parameters of instrumentation functions and
callbacks from VexTranslateArgs. See VEX r2958.

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

10 years agoAdapt LibVEX_Init invocation due to VEX r2955 changes.
Florian Krohm [Mon, 22 Sep 2014 21:40:06 +0000 (21:40 +0000)] 
Adapt LibVEX_Init invocation due to VEX r2955 changes.

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

10 years agoFix some comments that were still describing 32Gb as the limit for 'fast' memcheck
Philippe Waroquiers [Mon, 22 Sep 2014 19:46:48 +0000 (19:46 +0000)] 
Fix some comments that were still describing 32Gb as the limit for 'fast' memcheck

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

10 years agoAdd missing ]] to terminate CDATA. Missing brackets are causing
Philippe Waroquiers [Mon, 22 Sep 2014 19:19:50 +0000 (19:19 +0000)] 
Add missing ]] to terminate CDATA. Missing brackets are causing
the man page to contain:
               ></programlisting>

                     <para>And here are the same errors with
                     <option>--read-var-info=yes</option>:</para>

               <programlisting><![CDATA[

Rather than the nicely formatted 'And here ...' paragraph.

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

10 years agoFix wrong checking of ARG2 of getrlimit
Philippe Waroquiers [Fri, 19 Sep 2014 19:35:24 +0000 (19:35 +0000)] 
Fix wrong checking of ARG2 of getrlimit
(spotted by Florian Krohm/IBM's BEAM checker)

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

10 years agoHandle explicitely all enum values in 'switch' on AddrInfo tag
Philippe Waroquiers [Fri, 19 Sep 2014 18:58:18 +0000 (18:58 +0000)] 
Handle explicitely all enum values in 'switch' on AddrInfo tag
(reported by Florian)

Note that Addr_Undescribed will cause an assert if such
an undescribed addrinfo is pretty printed, as normally
such addrinfo should always be described before being pretty printed.

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

10 years agoRemove anouncement of helgrind dead in coregrind/m_debuginfo/README.txt
Philippe Waroquiers [Fri, 19 Sep 2014 09:08:42 +0000 (09:08 +0000)] 
Remove anouncement of helgrind dead in coregrind/m_debuginfo/README.txt
as helgrind died many years ago, but resuscitate since then.

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

10 years agofix 339156 - gdbsrv not called for fatal signal
Philippe Waroquiers [Fri, 19 Sep 2014 08:57:29 +0000 (08:57 +0000)] 
fix 339156 - gdbsrv not called for fatal signal

In preparation for removing --db-attach=yes, call gdbserver
for a fatal signal (where --db-attach=yes is also calling gdb)

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

10 years agor14319 dropped adding -Wwrite-strings to the compile flags.
Florian Krohm [Thu, 18 Sep 2014 19:39:10 +0000 (19:39 +0000)] 
r14319 dropped adding -Wwrite-strings to the compile flags.
Add it back in.

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

10 years agoFix a few casts that dropped type qualifiers. As pointed out by
Florian Krohm [Thu, 18 Sep 2014 18:35:47 +0000 (18:35 +0000)] 
Fix a few casts that dropped type qualifiers. As pointed out by
-Wcast-qual.

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