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

10 years agoRemove a few useless asserts after memory allocation.
Florian Krohm [Thu, 18 Sep 2014 18:34:19 +0000 (18:34 +0000)] 
Remove a few useless asserts after memory allocation.
The called allocators don't return NULL.

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

10 years agoRemove a few pointless asserts because the allocation functions
Florian Krohm [Thu, 18 Sep 2014 18:24:20 +0000 (18:24 +0000)] 
Remove a few pointless asserts because the allocation functions
do not return NULL.

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

10 years agoEnable -Wcast-align globally.
Florian Krohm [Thu, 18 Sep 2014 18:10:37 +0000 (18:10 +0000)] 
Enable -Wcast-align globally.
Tested on x86-64, s390, and ppc64.

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

10 years agoOld STABS code is still being compiled, but never used. Remove it.
Mark Wielaard [Thu, 18 Sep 2014 12:24:53 +0000 (12:24 +0000)] 
Old STABS code is still being compiled, but never used. Remove it.

Since valgrind 3.9.0 the STABS support was already disabled completely.
But the code was still there being compiled and we were still searching
for stabs sections in binaries. Completely remove all sources, tests and
references. Add a note to coregrind/m_debuginfo/README.txt to mention
the old code can be found in the subversion repository.

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

10 years agoDRD: Handle Imbe_CancelReservation properly (clrex on ARM)
Bart Van Assche [Thu, 18 Sep 2014 07:11:24 +0000 (07:11 +0000)] 
DRD: Handle Imbe_CancelReservation properly (clrex on ARM)

This was reported by Florian and was detected by analyzing the
compiler output with -Wswitch-enum enabled.

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

10 years agodrd/Makefile.am: Add -Wswitch-enum
Bart Van Assche [Thu, 18 Sep 2014 06:54:52 +0000 (06:54 +0000)] 
drd/Makefile.am: Add -Wswitch-enum

Hopefully one day this compiler flag can be enabled for the entire Valgrind
code base.

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

10 years agoPrepare NEWS sections for the next release 3.11.0
Philippe Waroquiers [Wed, 17 Sep 2014 20:57:54 +0000 (20:57 +0000)] 
Prepare NEWS sections for the next release 3.11.0
+ add fixed bug
339020 - ppc64: memcheck/tests/ppc64/power_ISA2_05 failing in nightly build
in the fixed bugs section.

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

10 years agoFix type2index. It did not handle decimal floating point types.
Florian Krohm [Wed, 17 Sep 2014 19:48:36 +0000 (19:48 +0000)] 
Fix type2index. It did not handle decimal floating point types.
nameOfTypeIndex likewise.

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

10 years agoValgrind regression test fix for stfdpx instruction.
Carl Love [Wed, 17 Sep 2014 17:43:08 +0000 (17:43 +0000)] 
Valgrind regression test fix for stfdpx instruction.

There is a bug in the stfdpx instruction test for ppc32 and ppc64.
The inline assembly to move the arguments into the registers before
the store instruction were moving from the register not to the
register.  The error has been fixed.  This results in a change in
the expected output.

Additionally, it was noted that the inline assembly was using "f" rather
then "d" for the double arguments.  Similarly, the prints should have
been %lf not %f for doubles.  These changes were made but they did not
change the output of the tests.

This patch fixes Vagrind bugzilla 339020.

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

10 years agoFix incorrect use of VG_(tool_panic). Adapt checker script accordingly.
Florian Krohm [Tue, 16 Sep 2014 09:28:12 +0000 (09:28 +0000)] 
Fix incorrect use of VG_(tool_panic). Adapt checker script accordingly.

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

10 years agoUpdate a comment
Florian Krohm [Tue, 16 Sep 2014 07:20:21 +0000 (07:20 +0000)] 
Update a comment

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

10 years agocoregrind files shall use vg_assert not tl_assert.
Florian Krohm [Mon, 15 Sep 2014 20:57:45 +0000 (20:57 +0000)] 
coregrind files shall use vg_assert not tl_assert.
Tool files shall use tl_assert not vg_assert.
Fix code accordingly.
Adapted check_headers_and_includes to make sure the code
stays clean in that respect.

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

10 years agoFix leak that can happen in case of IO error between V gdbsrv and vgdb.
Philippe Waroquiers [Mon, 15 Sep 2014 20:20:24 +0000 (20:20 +0000)] 
Fix leak that can happen in case of IO error between V gdbsrv and vgdb.

Spotted by Florian Krohm/IBM BEAM checker

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

10 years agoRemove a comment that is no longer valid. The real reason we (now)
Florian Krohm [Mon, 15 Sep 2014 20:18:39 +0000 (20:18 +0000)] 
Remove a comment that is no longer valid. The real reason we (now)
don't provide strtoll etc is that we don't need the flexibility and
are too lazy to implement the general case :) But that does not
warrant a comment in the code.

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

10 years agoTidy up m_xarray.c.
Florian Krohm [Mon, 15 Sep 2014 18:50:17 +0000 (18:50 +0000)] 
Tidy up m_xarray.c.
VG_(newXA) and VG_(cloneXA) never return NULL. Remove pointless asserts.

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

10 years agoDocument NULL-ness of the return value of the dedup allocation functions.
Florian Krohm [Mon, 15 Sep 2014 07:21:36 +0000 (07:21 +0000)] 
Document NULL-ness of the return value of the dedup allocation functions.
Avoid conflict with reserved name 'free'.
Remove a few pointless asserts.

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

10 years agoDocument that VG_(newPA) and VG_(allocEltPA) never return NULL.
Florian Krohm [Sun, 14 Sep 2014 22:44:53 +0000 (22:44 +0000)] 
Document that VG_(newPA) and VG_(allocEltPA)  never return NULL.
Remove a few pointless asserts.
Avoid conflict with reserved name 'free'.

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

10 years agoDocument that VG_(newRangeMap) never returns NULL.
Florian Krohm [Sun, 14 Sep 2014 22:19:52 +0000 (22:19 +0000)] 
Document that VG_(newRangeMap) never returns NULL.
Remove pointless asserts.

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

10 years agoTidy up m_wordfm.
Florian Krohm [Sun, 14 Sep 2014 22:11:44 +0000 (22:11 +0000)] 
Tidy up m_wordfm.
First, as the allocator function does not fail, there is no need
to assert its return value.
Second, remove commented out (since r8765) function VG_(isEmptyFM).
Third, remove VG_(getNodeSizeFM) from the API. The details of the
implementation do not need to be exposed.
Fourth, for consistency require that the copy functions for keys and
values in VG_(dopyFM) (which are essentially like allocators) return
non-NULL values for non-NULL arguments if they return.
Fifth, document NULL-ness of return values for VG_(newFM), VG_(dopyFM),
and VG_(newBag). Remove pointless asserts at call sites.
Six, change avl_dopy to assert that the node the function is
supposed to copy is not NULL. It is called that way anyhow. With
that change the function never returns NULL which allows us to
simplify the call sites. Checking the return value is no longer needed.

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

10 years agoML_(dinfo_zalloc/strdup) never return NULL. Remove pointless
Florian Krohm [Sun, 14 Sep 2014 07:40:19 +0000 (07:40 +0000)] 
ML_(dinfo_zalloc/strdup) never return NULL. Remove pointless
asserts at call sites.

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

10 years agoDocument that VG_(newSWA) never returns NULL (because its
Florian Krohm [Sat, 13 Sep 2014 22:39:31 +0000 (22:39 +0000)] 
Document that VG_(newSWA) never returns NULL (because its
allocation function does not). Audit call sites.

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

10 years agoDocument the NULL-ness of the return values of HT_construct and HT_to_array.
Florian Krohm [Sat, 13 Sep 2014 22:31:13 +0000 (22:31 +0000)] 
Document the NULL-ness of the return values of HT_construct and HT_to_array.
Audit call sites.

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

10 years agoTidy up m_oset.c
Florian Krohm [Sat, 13 Sep 2014 22:04:33 +0000 (22:04 +0000)] 
Tidy up m_oset.c
- Document that the allocation function must ot return NULL.
- As a conequence of the previous requirement the various Create and AllocNode
  functions cannot return NULL. Remove pointless asserts at call sites.
- Remove documentation of undefined function  CreateWithCmp.
- Names of library functions (such as 'free') are reserved as a are names
  beginning with underscores. Don't use those.

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

10 years agoconfigure.ac: Generalize glibc version check
Bart Van Assche [Sat, 13 Sep 2014 10:53:00 +0000 (10:53 +0000)] 
configure.ac: Generalize glibc version check

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

10 years agoconfigure.ac: Generalize gcc / clang version check
Bart Van Assche [Sat, 13 Sep 2014 09:42:29 +0000 (09:42 +0000)] 
configure.ac: Generalize gcc / clang version check

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

10 years agoVG_(malloc/calloc/strdup) never return NULL (and never will).
Florian Krohm [Fri, 12 Sep 2014 22:24:51 +0000 (22:24 +0000)] 
VG_(malloc/calloc/strdup) never return NULL (and never will).
So it's pointless to test or assert their return values.
Remove code doing so.

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

10 years agoFix a memory leak found by IBM's BEAM checker.
Florian Krohm [Fri, 12 Sep 2014 20:53:43 +0000 (20:53 +0000)] 
Fix a memory leak found by IBM's BEAM checker.

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

10 years agoWhen piecing together the file name of a vgdb FIFO do not allow
Florian Krohm [Fri, 12 Sep 2014 19:52:32 +0000 (19:52 +0000)] 
When piecing together the file name of a vgdb FIFO do not allow
user names and host names containing '/' characters.

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

10 years agoRecord some bugs outstanding following 3.10.0.
Julian Seward [Fri, 12 Sep 2014 09:47:00 +0000 (09:47 +0000)] 
Record some bugs outstanding following 3.10.0.

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

10 years agoBump version on the trunk (--> 3.11.0.SVN).
Julian Seward [Fri, 12 Sep 2014 09:31:13 +0000 (09:31 +0000)] 
Bump version on the trunk (--> 3.11.0.SVN).

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

10 years agoMerge r14514 from 3_10_BRANCH (--> 3.10.0)
Julian Seward [Fri, 12 Sep 2014 09:27:35 +0000 (09:27 +0000)] 
Merge r14514 from 3_10_BRANCH (--> 3.10.0)

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

10 years agoMerge r14513 from 3_10_BRANCH (Update docs w.r.t. status of
Julian Seward [Fri, 12 Sep 2014 09:22:36 +0000 (09:22 +0000)] 
Merge r14513 from 3_10_BRANCH (Update docs w.r.t. status of
partially-enabled --read-inline-info.)

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

10 years agoAdd a missing break as identified by IBM's BEAM checker.
Florian Krohm [Thu, 11 Sep 2014 22:27:20 +0000 (22:27 +0000)] 
Add a missing break as identified by IBM's BEAM checker.

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

10 years agoRemove some unneded checks as identified by IBM's BEAM checker.
Florian Krohm [Thu, 11 Sep 2014 22:15:39 +0000 (22:15 +0000)] 
Remove some unneded checks as identified by IBM's BEAM checker.

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

10 years agoUse wrapper functions VG_(malloc) and friends consistently across the
Florian Krohm [Thu, 11 Sep 2014 21:19:17 +0000 (21:19 +0000)] 
Use wrapper functions VG_(malloc) and friends consistently across the
board (instead of e.g. VG_(arena_malloc)(VG_AR_CORE,...). This change
also benefits static analysers. We can tell tools that VG_(malloc) allocates
and VG_(free) deallocates and that they are a pair. But we cannot do that for
arena_malloc/free.
Also provide a wrapper VG_(realloc_shrink).

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

10 years agoRename VG_(malloc_usable_size) to VG_(cli_malloc_usable_size)
Florian Krohm [Thu, 11 Sep 2014 20:15:23 +0000 (20:15 +0000)] 
Rename VG_(malloc_usable_size) to VG_(cli_malloc_usable_size)
because it operates on the CLIENT arena. Given that VG_(malloc)
operates on the CORE arena, it was unexpected for VG_(mallos_usable_size)
to use a different arena.
Move function definition to the proper place (next to VG_(cli_malloc))
and fix call sites.

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

10 years agoAvoid doing arithmetic with NULL
Philippe Waroquiers [Thu, 11 Sep 2014 19:56:03 +0000 (19:56 +0000)] 
Avoid doing arithmetic with NULL

Spotted by Florian Krohm/BEAM

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

10 years agoBug 338974 glibc 2.20 changed size of struct sigaction sa_flags on s390
Mark Wielaard [Wed, 10 Sep 2014 12:08:15 +0000 (12:08 +0000)] 
Bug 338974 glibc 2.20 changed size of struct sigaction sa_flags on s390

To track POSIX glibc and the kernel agreed to change the type of the
sa_flags field in struct sigaction to an int. There is now a int
__glibc_reserved0 padding field that can be passed undefined.
See https://sourceware.org/ml/libc-alpha/2014-09/msg00161.html

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

10 years agoHandle gcc version 5.x.y.
Mark Wielaard [Wed, 10 Sep 2014 00:52:30 +0000 (00:52 +0000)] 
Handle gcc version 5.x.y.

Recognize the future versions of gcc will be called 5.x.y.
Ignore line directives in glibc version configure test (newer
gcc/cpp will mark system macros with an extra line comment).

Patch from  Dmitry Djachenko (dimhen@gmail.com). Fixes #338932.

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

10 years agoFix missing break in switch
Philippe Waroquiers [Tue, 9 Sep 2014 21:06:19 +0000 (21:06 +0000)] 
Fix missing break in switch
Spotted by Florian Krohm, using BEAM static analyzer

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

10 years agoAccept glibc 2.20 as valid.
Mark Wielaard [Mon, 8 Sep 2014 23:41:31 +0000 (23:41 +0000)] 
Accept glibc 2.20 as valid.

The pre-releases were all called 2.19.90 and worked fine.
But now that glibc 2.20 final is out configure wouldn't recognize it.

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

10 years agoReplace wrong <../memcheck.h> by "../memcheck.h"
Philippe Waroquiers [Mon, 8 Sep 2014 20:41:30 +0000 (20:41 +0000)] 
Replace wrong <../memcheck.h> by "../memcheck.h"

This might cause the test to fail to compile with clang.
Might be worth merging in 3.10 branch.

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

10 years agoalso do unshare and pivot_root on s390x
Christian Borntraeger [Mon, 8 Sep 2014 12:15:14 +0000 (12:15 +0000)] 
also do unshare and pivot_root on s390x

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

10 years agomips32: mention MIPS32/Android as supported platform
Petar Jovanovic [Mon, 8 Sep 2014 12:10:10 +0000 (12:10 +0000)] 
mips32: mention MIPS32/Android as supported platform

Mention MIPS32/Android as supported platform in NEWS

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

10 years agoCreate 3_10_BUGSTATUS.txt.
Julian Seward [Mon, 8 Sep 2014 11:22:52 +0000 (11:22 +0000)] 
Create 3_10_BUGSTATUS.txt.

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

10 years agoUpdate.
Julian Seward [Mon, 8 Sep 2014 11:21:10 +0000 (11:21 +0000)] 
Update.

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

10 years agoAdd support for sys_pivot_root and sys_unshare. Patch from
Julian Seward [Mon, 8 Sep 2014 11:19:48 +0000 (11:19 +0000)] 
Add support for sys_pivot_root and sys_unshare.  Patch from
Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>.
n-i-bz (patch on dev@, 27 Aug 2014)

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

10 years agoupdate svn ignore lists
Petar Jovanovic [Mon, 8 Sep 2014 11:13:44 +0000 (11:13 +0000)] 
update svn ignore lists

Ignore the following files from now on:

- none/tests/x86/x87trigOOR
- auxprogs/getoff-x86-linux
- memcheck/tests/x86/sh-mem-vec128

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

10 years agoBug 338803 followup. Only print cross-CU warning when -v is given.
Mark Wielaard [Mon, 8 Sep 2014 09:25:55 +0000 (09:25 +0000)] 
Bug 338803 followup. Only print cross-CU warning when -v is given.

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

10 years agodrd/tests: Follow-up for r14478 - make regression test output independent of --read...
Bart Van Assche [Mon, 8 Sep 2014 08:04:40 +0000 (08:04 +0000)] 
drd/tests: Follow-up for r14478 - make regression test output independent of --read-inline-info

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

10 years agomips64: use generic MK_(guess_and_register_stack)
Petar Jovanovic [Mon, 8 Sep 2014 01:03:17 +0000 (01:03 +0000)] 
mips64: use generic MK_(guess_and_register_stack)

Follow up to Philippe's change in r14392 which does a cleanup and makes
all architectures use the same code to guess and register stack.

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

10 years agoDisable default-yes setting of read-inline-info for MacOS, and enable
Julian Seward [Sun, 7 Sep 2014 19:53:41 +0000 (19:53 +0000)] 
Disable default-yes setting of read-inline-info for MacOS, and enable
it for drd on Linux.

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

10 years agoMore stack-end-semantics fixups for MacOS following r14422 and r14392.
Julian Seward [Sun, 7 Sep 2014 16:08:20 +0000 (16:08 +0000)] 
More stack-end-semantics fixups for MacOS following r14422 and r14392.
May fix #338878.

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

10 years agoGo back to $test_dirs after each test run or tests dir run
Philippe Waroquiers [Sun, 7 Sep 2014 12:36:58 +0000 (12:36 +0000)] 
Go back to $test_dirs after each test run or tests dir run
Otherwise, we get an error for the 2nd dir if specifying 2 directories e.g.

  perl tests/vg_regtest cachegrind/tests callgrind/tests
  -- Running  tests in cachegrind/tests ----------------------------------
  chdir:           valgrind   ./chdir
  clreq:           valgrind   -q ./clreq
  dlclose:         valgrind   ./dlclose
  notpower2:       valgrind   --I1=32768,8,64 --D1=24576,6,64 --LL=3145728,12,64 ./../../tests/true
  wrap5:           valgrind   ./../../memcheck/tests/wrap5
  -- Running  tests in cachegrind/tests/x86 ------------------------------
  fpu-28-108:      valgrind   ./fpu-28-108
  -- Finished tests in cachegrind/tests/x86 ------------------------------
  -- Finished tests in cachegrind/tests ----------------------------------
  `callgrind/tests' neither a directory nor a readable test file/name

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

10 years agoupdate callgrind and cachegrind filtering logic following rev 14469
Philippe Waroquiers [Sun, 7 Sep 2014 12:15:52 +0000 (12:15 +0000)] 
update callgrind and cachegrind filtering logic following rev 14469
rev 14469 gives better description of the tweak done to the
simulated cache. Update filtering logic to filter this (variable) tweaking
msg.

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

10 years agoDo not modify a character string that could be a readonly
Florian Krohm [Sat, 6 Sep 2014 20:40:28 +0000 (20:40 +0000)] 
Do not modify a character string that could be a readonly
string literal.

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

10 years agoreadstabs.c: Don't include a.out.h, just define the stabs symbol nlist entry.
Mark Wielaard [Sat, 6 Sep 2014 19:29:51 +0000 (19:29 +0000)] 
readstabs.c: Don't include a.out.h, just define the stabs symbol nlist entry.

readstabs.c tries to include a.out.h to get the stabs symbol list entry
definition. STABS isn't specifically tied to the a.out format though.
The symbol entry structure just happens to be defined in the a.out.h
header. The header isn't really standard though. It might be provided
by glibc or the kernel in different locations. And not all arches support
the a.out format so the header might not even exist. Just define the
needed nlist struct entry directly in readstabs.c for VGO_linux. All
arches in glibc and the kernel use the same one anyway.

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

10 years agonightly: source is a bashism, use '.' instead
Mark Wielaard [Sat, 6 Sep 2014 18:33:14 +0000 (18:33 +0000)] 
nightly: source is a bashism, use '.' instead

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

10 years agonightly: Try harder to get vendor stuff.
Mark Wielaard [Sat, 6 Sep 2014 17:37:55 +0000 (17:37 +0000)] 
nightly: Try harder to get vendor stuff.

/etc/issue.net might just contain control chars (like \S) a generic welcome
message or omit the precise version. The newest standard is /etc/os-release
http://www.freedesktop.org/software/systemd/man/os-release.html
Otherwise there is often lsb_release
http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html
Try those first, fall back to /etc/issue.net if neither is there.

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

10 years agonightly: Try even more locations for finding glibc.
Mark Wielaard [Sat, 6 Sep 2014 17:37:54 +0000 (17:37 +0000)] 
nightly: Try even more locations for finding glibc.

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

10 years agoAvoid a compiler warning about int-to-ptr casting.
Julian Seward [Sat, 6 Sep 2014 15:25:08 +0000 (15:25 +0000)] 
Avoid a compiler warning about int-to-ptr casting.

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

10 years agoRename "--kernel-variant=android-emulator-no-hw-tls" to
Julian Seward [Sat, 6 Sep 2014 14:45:12 +0000 (14:45 +0000)] 
Rename "--kernel-variant=android-emulator-no-hw-tls" to
"=android-no-hw-tls" per suggestion from Philippe.

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

10 years agodrd: Make regression test output independent of --read-inline-info
Bart Van Assche [Sat, 6 Sep 2014 12:19:23 +0000 (12:19 +0000)] 
drd: Make regression test output independent of --read-inline-info

There are plans to enable --read-inline-info=yes for all Valgrind
tools. Hence make the DRD regression test output independent of how
--read-inline-info has been set.

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