This patch implements the flag --delta-stacktrace=yes/no.
Yes indicates to calculate the full history stack traces by
changing just the last frame if no call/return instruction was
executed.
This can speed up helgrind by up to 25%.
This flags is currently set to yes only on linux x86 and amd64, as some
platform dependent validation of the used heuristics is needed before
setting the default to yes on a platform. See function check_cached_rcec_ok
in libhb_core.c for more details about how to validate/check the behaviour
on a new platform.
Set correct values from Linux kernel.
See ./arch/mips/include/uapi/asm/sockios.h
This issue is covered by newly introduced memcheck test mips32/bad_sioc.
g++ 4.4.7 doesn't accept union field initializers:
In file included from ../../include/pub_tool_vki.h:50,
from valgrind_cpp_test.cpp:13:
../../include/vki/vki-linux.h: In function ‘vki_cmsghdr* __vki_cmsg_nxthdr(void*, __vki_kernel_size_t, vki_cmsghdr*)’:
../../include/vki/vki-linux.h:673: error: expected primary-expression before ‘.’ token
Assign value after declaration which works for any g++ version.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16437
- VG_MINIMAL_SETJMP and VG_MINIMAL_LONGJMP for VGP_mips64_linux are defined.
- Implementation of VG_MINIMAL_SETJMP and VG_MINIMAL_LONGJMP for mips32 is
improved by rescuing FP registers.
This should unbreak mips64/clang build.
Patch by Aleksandar Rikalo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16378
- add musl libc detection (prevents configure error)
- adjust preload and symbol names (based on the OpenWrt patch, see [1])
[1] https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/
200-musl_fix.patch?rev=46302
Patch by Peter Seiderer <ps.report@gmx.net>
It fixes Bug 359202.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16296
Patch from Matthias Schwarzott (zzam@gentoo.org). The patch removes
a volatile memory read which was only there to stop compilers warning
about |format| being unused.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16290
Reduces the number of compiler warnings on MIPS platforms.
Partial fix for BZ#370028.
Patch by: Aleksandar Rikalo <aleksandar.rikalo@imgtec.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16256
On ppc64*, the TOC ptr should not be considered a scratch
register, and should not be in the clobber list.
This is called out in newer GCC (i.e. gcc7) and triggers an error.
Thusly, remove R2 from the clobber list.
Signed-Off-By: Will Schmidt <will_schmidt@vnet.ibm.com>
Tested and committed by: Carl Love <cel@us.ibm.com>
Bugzilla is 376729.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16254
Fix 373192 Calling posix_spawn in glibc 2.24 completely broken
Functionally, this patch just does the following 2 changes to the
fork clone handling:
* It does not mask anymore CLONE_VFORK :
The only effect of this flag is to suspend the parent, waiting for
the child to either exit or execve.
If some applications depends on this synchronisation, better keep it,
as it will not harm to suspend the parent valgrind waiting for the
child valgrind to exit or execve.
* In case the guest calls the clone syscall providing a non zero client stack,
set the child guest SP after the syscall, before executing guest instructions.
Not setting the guest stack ptr was the source of the problem reported
in the bugs.
This also adds a test case none/tests/linux/clonev.
Before this patch, test gives a SEGV, which is fixed by the patch.
The patch is however a lot bigger : this fix was touching some (mostly
identical/duplicated) code in all the linux platforms.
So, the clone/fork code has been factorised as much as possible.
This removes about 1700 lines of code.
This has been tested on:
* amd64
* x86
* ppc64 be and le
* ppc32
* arm64
This has been compiled on but *not really tested* on:
* mips64 (not too clear how to properly build and run valgrind on gcc22)
It has *not* been compiled and *not* tested on:
* arm
* mips32
* tilegx
* darwin (normally, no impact)
* solaris (normally, no impact)
The changes are relatively mechanical, so it is not impossible that
it will compile and work out of the box on these platforms.
Otherwise, questions welcome.
A few points of interest:
* Some platforms did have a typedef void vki_modify_ldt_t,
and some platforms had no definition for this type at all.
To make it easier to factorise, for such platforms, the following has
been used:
typedef char vki_modify_ldt_t;
When the sizeof vki_modify_ldt_t is > 1, then the arg syscall is checked.
This is somewhat a hack, but was simplifying the factorisation.
* for mips32/mips64 and tilegx, there is a strange unconditional assignment
of 0 to a register (guest_r2 on mips, guest_r0 on tilegx).
Unclear what this is, in particular because this is assigned whatever
the result of the syscall (success or not).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16186
with no size/direction hints. (DVD_READ_STRUCT)
Patch from Austin English (austinenglish@gmail.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16153
with no size/direction hints. (CDROMSTOP).
Patch from Austin English (austinenglish@gmail.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16152
Note: the outer now unconditionally report the inner guest stacktrace.
If that would be a problem, we might add a sim-hint no-inner-guest-stacktrace
to optionally disable such outer behaviour.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16139
This commit is the bulk of the new code.
There is however no functional impact yet : the new modules are not used by anybody.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16123
This allows to search more efficiently a string in an xarray of string.
(support work for xtree)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16122
Coredumps created for MIPS are not valid today. Update the list of
registers that have to be saved, and use the structure defined in
kernel.
Patch by Aleksandar Rikalo.
It fixes BZ#351692.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16080