of which was presumed to be redundant but wasn't. This caused code
to hang due to an infinite signal-delivery loop. Observed and
tracked down by Austin English.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15091
The objective of libvex_test is to verify that the VEX lib
can be used in 'single arch mode' (host == guest).
The objective of libvexmultiarch_test is to verify that the VEX lib
can be used in 'multi arch mode' (freely choose host and guest).
(but not many combinations are working: if wordsize or endianess
differs, then libVEX quickly asserts somewhere).
libvex_test.c is somewhat bizarre, as it uses the architecture
for which we have compiled as the guest, and use a 'foreign' arch
as the host.
That allows to avoid having to define in the test a bunch
of arch specific asm instructions : the test just decode a part
of its own code, and translate it to other archs.
By default, only the combination host == guest is run.
Arguments must be given to run other combinations.
See libvex_test.c for a description on how to specify which combinations
to run.
LibVEX host != guest does not (yet?) work when endianess or word size differs
between host and guest.
Also, currently, TILEGX host is not working properly (unless guest is also
TILEGX), as the evcheck instructions generated differs according to
the offset of the host_EvC_{FAILADDR,COUNTER}.
So, using TILEGX as host is only done when guest is also TILEGX.
Note that it is possible to specify a specific host arch to use.
For example, to force TILEGX to be used, do:
./none/tests/libvexmultiarch_test 1034
(where 1034 is the decimal value corresponding to the enum VexArchTILEGX.
This currently aborts with:
...
------------------------ Assembly ------------------------
EvCheck (evCheck) ld r11, 8(r50); addli r11, r11, -1; st r11, 8(r50); bgez r11, nofail; jalr *(r50); nofail:
vex: priv/host_tilegx_defs.c:2353 (emit_TILEGXInstr): Assertion `evCheckSzB_TILEGX() == (UChar*)p - (UChar*)p0' failed.
//// failure exit called by libVEX
Whe TILEGX is fixed, we can remove the specific condition that avoids using
TILEGX as host.
Small changes have been done on VEX to allow more combinations
to work:
* host_mips_defs.c : when not compiled on mips,
a lot of mips specific code is not compiled at all, because
one of _MIPSEL or _MIPSEB must be defined to have either the
little endian code or big endian code.
emit32 function must however work to use mips as host.
So, for this function, if _MIPSEL is not defined, then
the big endian code is compiled in by default.
(the mips endianess should probably be handled like the ppc
endianess, for which the endianness to use is decided at runtime).
* host_arm64_isel.c : addition of a 'do not emit anything' for
ABI HINT (avoid an assert e.g. for amd64 guest, arm64 host)
* libvex_guest_amd64.h : when I was still hoping mixing amd64 and x86,
a first assert was firing up due to size/alignment
of VexGuestAMD64State when compiled in 32 bits.
=> addition of pad elements to ensure the size and alignment
of VexGuestAMD64State stays the same when compiled in 32 and
64 bits (the 64 bits layout is unchanged).
The new tests have been run on x86/amd64/ppc64/s390x.
It is very well possible that the tests will fail on untested archs
(ppc32 or mips* or arm* or tilegx)
(e.g. because the hardcoded hwcaps in libvex_test.c are not ok).
It should be relatively trivial to fix these hwcaps problems.
Some other problems might be less easy to understand and fix
(e.g. similar to the TILEGX evcheck or mips emit32 problem).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15084
done from libhb_maybe_GC, i.e. check the condition in
libhb_maybe_GC, and call the (non inlined) GC only if
a GC is needed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15082
Valgrind aspects, to match vex r3124.
See bug 339778 - Linux/TileGx platform support to Valgrind
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
Valgrind currently does not support the following AUX vector entries:
AT_DCACHEBSIZE, and AT_HWCAP2. By default these entries are suppressed by
Valgrind. The attached patch adds the needed support so the user level programs
can correctly determine that hardware level they are running on. Specifically
that the ISA 2.07 for Power 8 is supported.
Bugzilla 345695
This fix adds the needed support. It makes a minor change to allow the
VEX settings of the host platform to be passed down so they can be checked
against the HWCAP values.
The files touched are:
coregrind/m_initimg/initimg-linux.c
coregrind/pub_core_initimg.h
coregrind/m_main.c
committed by Carl Love cel@us.ibm.com
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15078
putting them into a string table.
This patch adds reference counting to segment names and frees them
when they are no longer used. The so freed memory can be reclaimed to
store future segment names.
New file coregrind/m_aspacemgr/aspacemgr-segnames.c which has all the
code dealing with segment names. Carved out of aspacemgr-linux.c
Detailled comments in the code.
Fixes BZ 344559.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15073
named 'now' with this contents:
#!
/bin/date
the platform selection logic does this:
--11196:1:launcher no tool requested, defaulting to 'memcheck'
--11196:2:launcher selecting platform for './now'
--11196:2:launcher selecting platform for './now'
--11196:2:launcher opened './now'
--11196:2:launcher read 13 bytes from './now'
--11196:2:launcher selecting platform for ''
--11196:2:launcher selecting platform for '/home/florian/bin/'
--11196:2:launcher opened '/home/florian/bin/'
--11196:2:launcher selected platform 'unknown'
--11196:1:launcher no platform detected, defaulting platform to 'amd64-linux'
That is not quite right. Instead the platform should be determined by
examining the default shell.
Additionally, define VKI_BINPRM_BUF_SIZE because on linux only that many
characters are considered on a #! line. C.f. <linux>/fs/binfmt_script.c
m_ume/* needs to be adapted as well but that is a different patch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15068
To do that a small enhancement to vg_regtest was needed:
(1) New declaration to allow specifying an environemnt variable
that is set prior to invoking valgrind.
eg: env: VAR=VAL
There can be more than one such declaration
(2) prog-asis: program_name
This is like prog: except the program name is not prefixed with
the testdir.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15064
For default memcheck configuration, 32 bits) this patch
decreases by 13.6 MB ie. from 89945856 to 76317696.
Note that the type EClassNo is introduced only for readibility
purpose (and avoid some cast). That does not change the size
of the TTEntry.
The TTEntry size is reduced by using unions and/or Bool on 1 bit.
No performance impact detected (outer callgrind/inner memcheck bz2
on x86 shows a small improvement).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15054
Revision 14976 causes a regression : stacktrace produced when the
stack has not yet been extended to cover SP will only contain one
element, as the stack limits are considered to be the limits of
the resvn segment.
This patch fixes that, by taking Resvn/SmUpper segment into
account to properly compute the limits.
It also contains a new regtest that fails with the trunk
(only one function in the stacktrace)
and succeeds with this patch (the 2 expected functions).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15046
in gdbserver was wrongly giving the file load address,
instead of the text segment address start.
This means that GDB was then showing wrong symbols for an address
(typically, symbols slightly before the address being printed).
This patch ensures the hint given is using the text start address.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15045
* do VTS pruning only if new threads were declared
very dead since the last pruning round.
* When doing pruning, use the new list of threads very dead
to do the pruning : this decreases the cost of the dichotomic search
in VTS__substract
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15044
Extend the test to introduce cases for SEQI and SNEI when immediate is
equal to the content of the GPR rs. Minor code style changes added.
Patch by Maran Pakkirisamy.
Related issue - BZ #341997.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15043
be VKI_PAGE_SIZE. That follows from the requirement that
the address ought to be page aligned and > 0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15042
* give the avg nr of IPs per execontext
* use the newly introduced %f in m_transtab.c ratio
and in the avg nr of execontext per list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15041