perl_5.32.0~rc1-1 FTBFS on m68k (experimental)
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Fri Jun 19 09:20:08 BST 2020
> On Jun 19, 2020, at 10:02 AM, Geert Uytterhoeven <geert at linux-m68k.org> wrote:
>
> Hi Adrian,
>
>> On Thu, Jun 18, 2020 at 10:46 PM John Paul Adrian Glaubitz
>> <glaubitz at physik.fu-berlin.de> wrote:
>>> On 6/18/20 12:10 PM, John Paul Adrian Glaubitz wrote:
>>> Reported upstream [1].
>>
>> It's an alignment issue and can be trivially fixed with this patch:
>>
>> diff --git a/op.h b/op.h
>> index fc21f03cda..480c95245b 100644
>> --- a/op.h
>> +++ b/op.h
>> @@ -698,7 +698,7 @@ struct opslot {
>> U16 opslot_size; /* size of this slot (in pointers) */
>> U16 opslot_offset; /* offset from start of slab (in ptr units) */
>> OP opslot_op; /* the op itself */
>> -};
>> +} __attribute__ ((aligned (4)));
>>
>> struct opslab {
>> OPSLAB * opslab_next; /* next slab */
>
> In the mean time, you changed this to add explicit padding instead:
>
> https://github.com/Perl/perl5/issues/17871
>
>> diff --git a/op.h b/op.h
>> index fc21f03cda..fb9f538e23 100644
>> --- a/op.h
>> +++ b/op.h
>> @@ -714,6 +714,7 @@ struct opslab {
>> # ifdef PERL_DEBUG_READONLY_OPS
>> bool opslab_readonly;
>> # endif
>> + U16 opslab_padding; /* padding to ensure proper alignment */
>> OPSLOT opslab_slots; /* slots begin here */
>> };
>
> I take it PERL_DEBUG_READONLY_OPS is enabled?
> Hence the padding should be moved inside the #ifdef,
> Furthermore, sizeof(bool) = 1, right? So you still have an implicit
> hole, and it would be better to add 3 bytes of explicit padding
> instead one 16-bit quantity.
No, I didn’t take that #ifdef into consideration.
And I’m confused now.
Add the three bytes how? Inside the #ifdef makes no sense as that wouldn’t fix release builds.
Adrian
More information about the Perl-maintainers
mailing list