Hi Adrian, On Fri, Jun 19, 2020 at 10:20 AM John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> wrote: > > On Jun 19, 2020, at 10:02 AM, Geert Uytterhoeven <ge...@linux-m68k.org> > > wrote: > >> On Thu, Jun 18, 2020 at 10:46 PM John Paul Adrian Glaubitz > >> <glaub...@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.
So release builds fail, too? And they don't set PERL_DEBUG_READONLY_OPS? If PERL_DEBUG_READONLY_OPS is not set, I see no reason why the padding would be needed. Disclaimer: looking at the 5.26 version from Ubuntu, as github seems to be down. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds