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
Description: Digital signature

