|
From: Matthias S. <zz...@ge...> - 2016-06-01 18:22:52
|
Am 01.06.2016 um 13:06 schrieb Yasushi SHOJI:
> 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
>
Maybe some of these asserts should be re-written to be checked at
compile time. There are some versions of a STATIC_ASSERT macro that
could be used.
Regards
Matthias
|