Bug#804536: gcc-5: [mips,mipsel] regression in optimization causes FTBFS for gsoap
Aurelien Jarno <[email protected]>
| Newsgroups | gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
On 2015-11-09 11:53, Mattias Ellert wrote: > Package: gcc-5 > Version: 5.2.1-23 > Severity: serious > Justification: causes gsoap to FTBFS > Control: affects -1 gsoap > Control: block 804455 by -1 > X-Debbugs-Cc: [email protected] > > Hi! > > The binnmu of gsoap 2.8.22-1 due to the openssl transition failed on > mips and mipsel, but succeeded on the other architectures. > > https://buildd.debian.org/status/package.php?p=gsoap > > (It also succeeded on mip64le - but the mips64el build used gcc-5 > 5.2.1-21 while mips and mipsel used 5.2.1-23. I am not sure if this is > relevant information.) > > The failure is a segmentation fault when running the soapcpp2 binary > that has been compiled as part of the build. The soapcpp2 binary is not > linked to openssl, so the issue is not due to the new openssl library > that triggered the binnmu rebuild. > > I can reproduce the failure on the eder.debian.org porterbox. > > However, if I on the porterbox reduce the optimization from -O2 to -O1, > the build succeeds. This therefore looks like a regression in > mips/mipsel optimization. The wrongly compiled code is in soapcpp2_yacc.y (generated from soapcpp2.y) on line 2272 and following: | case 34: | #line 436 "soapcpp2_yacc.y" /* yacc.c:1646 */ | { if ((yyvsp[-1].rec).sto & Stypedef) | { sprintf(errbuf, "invalid typedef qualifier for '%s'", (yyvsp[0].sym)->name); | semwarn(errbuf); | } | printf("%p\n", (yyvsp[0].sym)); | p = enter(sp->table, (yyvsp[0].sym)); | p->info.typ = (yyvsp[-1].rec).typ; | p->info.sto = (yyvsp[-1].rec).sto; | p->info.hasval = False; | p->info.offset = sp->offset; | if (sp->grow) | sp->offset += p->info.typ->width; | else if (p->info.typ->width > sp->offset) | sp->offset = p->info.typ->width; | sp->entry = p; | } | #line 2290 "soapcpp2_yacc.c" /* yacc.c:1646 */ | break; The call to enter is translated into the following code: | $L129: | .loc 1 436 0 | lw $2,-60($20) | sw $2,188($sp) | andi $2,$2,0x10 | bne $2,$0,$L384 | lui $7,%hi($LC36) | | lw $6,0($20) | $LVL335 = . | $L385: | .loc 1 440 0 | lw $22,%got(sp)($28) | lw $25,%call16(enter)($28) | lw $2,0($22) | .reloc 1f,R_MIPS_JALR,enter | 1: jalr $25 | lw $4,0($2) Register a2 ($6) is loaded with (yyvsp[0].sym) instead of a1 ($5). I still have to check if it is reproducible with trunk and to find the optimization option causing the issue. Then we can report the bug upstream. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B [email protected] http://www.aurel32.net
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWQeGSAAoJELqceAYd3YybZ6kP/0GbFTxNuloD9HT8L5IExi/D GJfr26/Kunz8N1H5AVcW5CSAQrZivEgoPPRnio0OInq+9TbJct6xP/6weeUZGeMO V8HgPm28xpOW8VVGdbd/A0IPUdicJzBx1J89HfjyUcofL3yrvRU75u1hqqUO2Mjy GW7P7G11zbBnnRmVjCzU9dibICNNyyURYGt94us4hUzmTeohBOWe4srRluSjUME9 +rgKAPbJ+FL56yR6DYvzzdVKeuvrxRUn+N3Hrcn9sAckKdmhdIw0fpdQ84SSM8FB lTjTrFVDiePWDiDg85/ykA1SLoGeNT62b65CQCO8CQfxm2O7DqOZAIQYVSVNn4hK RkZaeZ5iZs8sK+fEz9b8aW9/v+pDmu64R3eqEAAMA5TAzvByzSSK1pfP/0i5f5V3 o9BRkltK85rXmSYZa3UmzYnlnA1qXcEj4t/tl4Hl4RP37OcJ8NcoGbTP2hYjzkUX joGdmvkzpqo3mSSRzdQrGB07a2gtxtpXjfzDEZcyZTLFeLvJALgbO7C+CMk7pvfy 0KMPenNar7IxCbbK5GYLQo8+o/MCA1KFRSXzs+bovuRibyoa50E/+KIgh0ChM0RZ OK+fGQy13hhHEeLF5qNxSNMIxOjTNT1snrGNUvLFLILSHZtYuSZuqyRcO/E3JVws 7hfdZvbiw8GMB8T+MIJb =bx7u -----END PGP SIGNATURE-----