|
From: Yasushi S. <ya...@at...> - 2016-06-01 11:25:42
|
Hi list,
On Fri, 29 Apr 2016 00:52:02 +0900,
svn...@pu... wrote:
>
> Author: sewardj
> Date: Thu Apr 28 16:52:01 2016
> New Revision: 15875
>
> Log:
> Un-break ppc32-linux following r15784. It appears that ppc32-ELF
> layout constraints are different from x86-ELF and so the assertion on
> the sizeof(TTEntryC) fails on ppc32-linux.
>
> Modified:
> trunk/coregrind/m_transtab.c
>
> Modified: trunk/coregrind/m_transtab.c
> ==============================================================================
> --- trunk/coregrind/m_transtab.c (original)
> +++ trunk/coregrind/m_transtab.c Thu Apr 28 16:52:01 2016
> @@ -2448,10 +2448,18 @@
> if (sizeof(HWord) == 8) {
> vg_assert(sizeof(TTEntryH) <= 32);
> vg_assert(sizeof(TTEntryC) <= 112);
> - } else if (sizeof(HWord) == 4) {
> + }
> + else if (sizeof(HWord) == 4) {
> vg_assert(sizeof(TTEntryH) <= 20);
> +# if defined(VGP_ppc32_linux)
> + /* ppc32-linux is weird. It thinks alignof(ULong) == 8 and so the
> + structure is larger than on other 32 bit targets. */
It's also 8 bytes on my armhf debian sid as I checked.
I noticed this when I built trunk r15889 on my 32 ARM board. When I
run, it failed with:
./vg-in-place true
==7907== Memcheck, a memory error detector
==7907== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==7907== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==7907== Command: true
==7907==
valgrind: m_transtab.c:2462 (vgPlain_init_tt_tc): Assertion 'sizeof(TTEntryC) <= 88' failed.
Segmentation fault
Something like this, obviously, works for me. But, not sure what arch
is weird and what's not; given that ppc, misp, and arm seems to have
the same alignment.
Index: coregrind/m_transtab.c
===================================================================
--- coregrind/m_transtab.c (revision 15889)
+++ coregrind/m_transtab.c (working copy)
@@ -2451,7 +2451,7 @@
}
else if (sizeof(HWord) == 4) {
vg_assert(sizeof(TTEntryH) <= 20);
-# if defined(VGP_ppc32_linux) || defined(VGP_mips32_linux)
+# if defined(VGP_ppc32_linux) || defined(VGP_mips32_linux) || defined(VGP_arm_linux)
/* On PPC32 and MIPS32 platforms alignof(ULong) == 8, so the
structure is larger than on other 32 bit targets. */
vg_assert(sizeof(TTEntryC) <= 96);
--
yashi
|