On Sun, Sep 25, 2016 at 03:30:45PM -0400, John David Anglin wrote: > On 2016-09-25, at 4:09 AM, Niko Tyni wrote: > > > - building with gcc-5 or at -O0 makes it go away > > - I've bisected with gcc #pragmas that disabling optimization for just > > Perl_custom_op_register() in op.c makes it go away > > - I haven't managed to find which specific optimization causes it > > Attached is the diff in assembly output for Perl_custom_op_register compiled > with gcc-5 and gcc-6, > respectively. This is with 5.22.2 which I happened to have handy. > > The differences are just label changes and I don't see any functional > difference in the assembly.
That's a bit weird. Presumably then the relevant difference in generated code between gcc versions is somewhere else, and the optimized version of Perl_custom_op_register() only breaks with the gcc 6 generated code. Anyway, I'm attaching a workaround patch that just lowers the optimization of op.c. I've verified that the test suite passes with this. We'll include this in the next perl upload unless somebody objects. -- Niko Tyni nt...@debian.org
>From 0950188fc6a08ecb3b924fc4973c3907ecfdbdf7 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Sun, 25 Sep 2016 09:59:22 +0200 Subject: [PATCH] Temporarily lower the optimization of op.c on hppa due to gcc-6 problems This fixes a crash in ext/XS-APItest/t/customop.t It's currently unclear if the problem is with the code or the gcc-6 optimizer. Bug-Debian: https://bugs.debian.org/838613 --- cflags.SH | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cflags.SH b/cflags.SH index a50044e..ba4ac89 100755 --- a/cflags.SH +++ b/cflags.SH @@ -495,6 +495,12 @@ for file do # or customize here case "$file" in + op) : work around http://bugs.debian.org/838613 + case $archname in + hppa-*) + optimize="$optimize -O0";; + esac;; + regcomp) : work around http://bugs.debian.org/754054 case $archname in mips-*|mipsel-*) -- 2.9.3