on amd64, vki_modify_ldt_t was defined as void (not very clear why).
sizeof (void) cannot be taken (or more precisely can be taken,
but nobody knows what that means and what gcc does).
So, uncommended the (supposedly) correct definition of the type.
Note that I checked the definition on debian 6.0, kernel 2.6.32
and the structure is still ok.
Still needed to look at the other platforms not properly
handling the *SETTID and the SETTLS flags in clone PRE_READ
logic and/or not defining the type vki_modify_ldt_t
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12589
and VEXTRACTF128, now that the implementation has been fixed. Current
status that all so-far implemented AVX instructions are tested by this
file, and none have any detectable failures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12588
rev 10493 fixed bug 117564 in syswrap-x86-linux.c.
This commit fixes the same problem in syswrap-amd64-linux.c.
The problem makes memcheck/tests/linux/stack_switch fails (at least on gcc20)
with unexpected
==802== Syscall param clone(child_tidptr) contains uninitialised byte(s)
The problem originates from always checking 3 optional args PRE_read,
while these should be checked only if the corresponding flags are set.
syswrap-{arm,ppc32,ppc64}-linux.c seems to have the same problem
(but no visible effect) : VKI_CLONE_PARENT_SETTID,VKI_CLONE_CHILD_SETTID
and VKI_CLONE_SETTLS not properly handled in the PRE part.
syswrap-s390x-linux.c seems to have the VKI_CLONE_SETTLS part wrong,
but VKI_CLONE_PARENT_SETTID and VKI_CLONE_CHILD_SETTID correct.
Commiting a fix just for amd64 for now.
We probably better make some common code in syswrap-generic.c
to regroup all similar platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12586
This implies to change the interface between the
arch independent gdbserver files and the arch dependent files
as AVX implies a choice of xml files at run time.
In valgrind-low-amd64.c, the xml files and the nr of registers
are different depending on AVX support or not.
Other platforms still have a fully static nr of registers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12581
AVX support implies to have target xml files which are selected
according to the machine hwcaps.
This change improves the structure of the gdbserver software layering
to prepare for this.
Basically, the protocol files (e.g. server.c) are now calling directly
the valgrind target operations which are now defined in target.h/target.c
(before, there was a level of indirection inheritated from the GDB
structure which was useless for valgrind gdbserver).
+ clarified some comments
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12579
this has been the preferred way to compile for quite a while. So let's follow
suit. The perf bucket did not reveal any measurable difference.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12572
Patch from Dave Goodell.
See bug 274078 for detailed patch description.
Tested on deb6/amd64 with a static MPI (now it will be ignored
rather than make the Valgrind build failing), with a shared MPI,
and with no MPI.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12567
* re-ordered the values to match the declaration order in
libvex_trc_values.h and pub_core_dispatch_asm.h
* added missing values
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12566
gcc 4.4 and 4.5 has a bug which causes miscompilation of mc_main.c:
args are not correctly given to VG_(am_munmap_valgrind).
This causes the secondary map entries to not be unmapped
(which can cause unlimited memory growth)
and/or causes the assert on VG_(am_munmap_valgrind) result to fail.
Removing the pragma optimize from mc_main.c and inserting it instead
in Makefile.all.am for x86 solves the gcc bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12564
It is suspected that there is a bug in the call to VG_(am_munmap_valgrind).
At first sight, it looks like a bug in gcc version 4.4.5 (Debian 4.4.5-8)
which seems to pass wrong arguments from mc_main.c to aspace mgr function.
Some tests are failing on gcc20 with this assert a.o.
./vg-in-place ./perf/bz2 x
gives an assert.
The bug does not happen if Valgrind is compiled with gcc 4.7.0.
On gcc20, the new tests failing with this assert are:
memcheck/tests/linux/lsframe1 (stderr)
memcheck/tests/linux/lsframe2 (stderr)
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/origin5-bz2 (stdout)
memcheck/tests/vcpu_bz2 (stdout)
memcheck/tests/vcpu_bz2 (stderr)
The assert is committed so as to see other platforms
where this is failing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12563
* pub_tool_redir.h : define the prefix to be used for "soname synonym"
place holder
* vg_replace_malloc.c : define synonym place holder for malloc related
functions
* m_redir.c : when detecting a soname synonym place holder redir spec, search
in clo_soname_synonyms if there is a synonym pattern.
If yes, replace the soname pattern. If not, ignore the redir spec.
* various files: implement or document the new clo --soname-synonyms
* new test memcheck/tests/static_malloc.vgtest
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12559
seconday platform (x86 and ppc32, respectively) is not available.
Add -DVGA_SEC_xxxxx and -DVGP_SEC_... to the GCC command line
indicating that a seconday platform is supported. Make arch_test.c
recognise those flags.
Fixes bugzilla #296983.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12556
in .S files. Also included here is some cleanup, including a reversion
of r10378. Fixes bugzilla #197914.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12555
--trace-redir=yes shows that there are duplicated redir entries e.g.
--32537-- TOPSPECS of soname NONE filename /home/philippe/valgrind/m_redir_trace/memcheck/vgpreload_memcheck-amd64-linux.so
--32537-- libc.so* strcasecmp_l R-> (2014.0) 0x04c28bf0
--32537-- libc.so* strcasecmp_l R-> (2014.0) 0x04c28bf0
--32537-- libc.so* __GI_strcasecmp_l R-> (2014.0) 0x04c28b70
--32537-- libc.so* __GI_strcasecmp_l R-> (2014.0) 0x04c28b70
These are caused by the merging of identical debug entries always
adding the two primary names, even if the entries are exactly the same.
This patch avoids duplicated names in debug info if the entry to merge
has only one name identical to the entry name to which we are merging.
This avoids the useless duplicated redir entries, and slightly decreases
the "dinfo" memory usage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12554
Many objects (shared or non shared) have no soname.
In such case, showing the filename clarifies where the
redir spec is coming from.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12552
* add a massif test to (somewhat) validate --pages-as-heap=yes
with calls to brk not being a multiple of a page size
* fix the assert:
only record new pages or unrecord old pages if at least one new
full page (or one full old page) is added/removed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12548
test group and test exponent instructions dtstdc, dtstdcq, dtstdg,
dtstdgq, dtstex and dtstexq. Bug #298862. (Carl Love,
carll@us.ibm.com and Maynard Johnson, maynardj@us.ibm.com)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12546
When investigating Valgrind out of memory situation,
it is useful to be able to output the list of segments of the
aspacemgr at any moment.
The GDB monitor command "v.info memory" has now an optional
argument allowing to output this list of segments
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12544
in each IRSB, rather than considering each IRSB to have a weight of 1.
This probably gives more representative profiles, especially post
t-chain merge, which made inter-SB transitions more or less free
compared to what they were before.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12542