Followup to r14908 (BZ #342603).
Comparing the command byte with VKI_I2C_SMBUS_QUICK is like comparing
apples to carrots, it makes no sense. The command byte is unused for
quick transactions anyway so checking its value is pointless.
Patch by Jean Delvare <jdelvare@suse.de>.
Followup to r14908 (BZ #342603).
The first byte of the data array holds the length, so the actual data
length is the value of that byte plus one.
Patch by Jean Delvare <jdelvare@suse.de>.
Carl Love [Wed, 16 Sep 2015 23:33:40 +0000 (23:33 +0000)]
Add Power PC ISA check to the vbit-test
The support for the Valgrind Iops is dependent on the Power processor
support for various instructions. The instructions supported by a
given Power processor is based on the version of the ISA. The patch
add a check to the vbit-test to ensure it does not try to test an Iop
that generates an instruction on the host that is not supported.
Pick up 'egrep' and 'strings' from $PATH instead of using
hardwired absolute path names. People can always arrange $PATH
such that these tools are found.
Fixes BZ #294065. Patch by Austin English <austinenglish@gmail.com>
Strange segments in /proc/self/maps have been observed in the field.
Namely those with a file name and an inode number but without major
and minor device numbers. See for instance https://bugs.kde.org/124528#c11
This patch also recognises segments with a file name as FileV segments
(which is what valgrind used to do prior to r5818).
Avoid warnings about deprecated unescaped curly brackets in regular
expressions. Happens with perl 5.22 and newer.
Patch by Matthias Schwarzott <zzam@gentoo.org>
Mark Wielaard [Sat, 5 Sep 2015 20:45:04 +0000 (20:45 +0000)]
Correct expected output of tc18 and tc20 helgrind tests.
The addition if the safe wrapper in r15620 introduced an extra
output frame in the backtrace of helgrind/tests/tc18_semabuse and
helgrind/tests/tc20_verifywrap.
Changes related to new IROp Iop_RoundF128toInt. See VEX r3183.
s390: Add testcase for fixbr.
Patch by Andreas Arnez <arnez@linux.vnet.ibm.com>.
Part of fixing BZ #350290.
To test extended BFP opcodes we need sizeof(long double) == 16.
Certain old versions of GCC don't have that as default. So we must
give -mlong-double-128 on the command line.
Pertains to BZ #352183.
Mark Wielaard [Fri, 4 Sep 2015 09:41:42 +0000 (09:41 +0000)]
Add safe sem_post handler and glibc-2.21 expected output for helgrind tests.
This fixes the tc18 and tc20 testcases.
On some bad semaphores glibc now might just abort, we catch the SIGABRT
and turn it into a EINVAL. The program will see this, but the helgrind
wrapper won't. Which works for tc18 since there is an alternate exp file
with that result (silent bad sem_post). We add a similar alternative exp
file for tc21.
- The default value for --leak-check-heuristics has been changed from
"none" to "all". This helps to reduce the number of possibly
lost blocks, in particular for C++ applications.
Enhance block_list memcheck gdbserver monitor command
Due to the (still to be done) default activation of --leak-check-heuristics=all,
improve the block_list monitor command for easier display of blocks
found reachable via heuristics.
Ivo Raisr [Mon, 31 Aug 2015 21:31:09 +0000 (21:31 +0000)]
Add support for ldsoexec on Solaris.
Solaris runtime linker allows to run dynamically linked programs indirectly, as:
ld.so.1 <dynamic_executable>
This is now possible under Valgrind as well.
Florian Krohm [Mon, 31 Aug 2015 21:18:18 +0000 (21:18 +0000)]
Ensure the testcase compiles with clang.
clang up to and including 3.6.2 does not recognise the fxsave64
and fxrstor64 mnemonics. It does recognise rex64/fxsave etc..
Related to BZ #339636.
Julian Seward [Mon, 31 Aug 2015 14:37:25 +0000 (14:37 +0000)]
Change the default setting for --dsymutil from =no to =yes, since
in practice it needs to be permanently enabled on OS X. No change
on other platforms.
Julian Seward [Mon, 31 Aug 2015 14:24:14 +0000 (14:24 +0000)]
Revisit r15601 (Change the --smc-check default value to =all-non-file.)
to restrict the change to those architectures that do provide automatic
D-I coherence (x86, amd64, s390x). This commit restores the default
value for all other architectures back to its pre r15601 state, so as not
to burden those architectures unnecessarily with =all-non-file.
use verbosity 1 to report multiple termination of gdbserver,
this can happen e.g. in case of irrecoverable execve failure.
This log was making tests fail randomly: the double termination
can only occur if gdbsrv was initialised.
After fork, gdbsrv is initialised by the next scheduler gdbsrv
activity check (by default, every 5000 blocks).
As a double termination has no effect, switch the trace to level 1.
Change default value for --keep-stacktraces has been changed to alloc-and-free
Default value changed following discussion on valdev.
Giving more information for errors with freed blocks can help
when investigating difficult problems (e.g. double free, programs
using 'cleanup list' collecting different types of memory, ...)
Regression tested on various setup (x86, ppc64, s390x, amd64, debian or fedora)
Tests that have only one exp files have been updated to use the output
of the new default value in their .exp file.
Tests having more than one exp file have been changed so as to
specify explicitely the previous clo default value (i.e. adding
--keep-stacktraces=alloc-then-free in the vgtest file).
Possibly, some tests might fail on non tested platforms
(e.g. mips, macos, solaris, tilegx).
Fixes should be straightforward, using one of the above fix techniques.
Florian Krohm [Wed, 26 Aug 2015 20:24:47 +0000 (20:24 +0000)]
Support
envB: var=value
in the .vgtest file. This is similar to "env:" except the environment
variable is set prior to invoking progB.
Adapt gdbserver_tests/nlgone_exit.vgtest to fix a problem reported
by Matthias Schwarzott <zzam@gentoo.org>
Ivo Raisr [Sat, 22 Aug 2015 22:08:43 +0000 (22:08 +0000)]
Distinguish properly when to establish the client data segment.
Initial data segment is established (see initimg-solaris.c for rationale):
- directly during client program image initialization,
- or on demand when the executed program is the runtime linker itself,
after it has loaded its target dynamic executable (see PRE(sys_mmapobj)),
or when the first brk() syscall is made.
More preparatory work for ldsoexec support.
n-i-bz
Fix warning signed unsigned comparison in m_oset.c :
../../coregrind/m_oset.c:413:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Ivo Raisr [Thu, 20 Aug 2015 20:25:19 +0000 (20:25 +0000)]
Initial data (brk) segment is setup on demand, when a first brk() syscall
is made. It cannot be established during client image initialization because
that would conflict with a temporary stack which ld.so.1 (when executed directly)
uses for loading the target dynamic executable.
See PRE(sys_brk) in syswrap-solaris.c.
Mark Wielaard [Wed, 19 Aug 2015 13:26:28 +0000 (13:26 +0000)]
Also install sigsegv handler in safe-pthread tests wrapper.
In case we do recognize the xend, but detect it is invalid
(used outside a transaction) we generate a segsegv instead
of a sigill. Handle that in the same way in the test case.
Mark Wielaard [Tue, 18 Aug 2015 14:34:49 +0000 (14:34 +0000)]
Handle (unwanted) line number info in filter_defcfaexpr.
This is just a testsuite cleanup. In the case defcfaexpr was compiled
with line number information (which might happen in some distro builds)
just throw it away because the expected output just wants to see the
function names.
Tom Hughes [Tue, 18 Aug 2015 10:29:20 +0000 (10:29 +0000)]
Attempt to work around issues with xend being executed unconditionally
when a pthread_rwlock is used in an invalid way.
Recent glibcs use transactional memory instructions to do lock ellision
but will sometimes, when locks are used in an invalid way, may calls to
xend on systems which don't support it, on the grounds that the program
is invalid anyway.
So we try and catch and ignore the resulting SIGILL in our tests that
deliberately work with invalid locks.