Bug 1859588 - LibreOffice FTBFS with internal compiler error
Summary: LibreOffice FTBFS with internal compiler error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1858036 1859125
TreeView+ depends on / blocked
 
Reported: 2020-07-22 14:14 UTC by Caolan McNamara
Modified: 2020-10-05 08:32 UTC (History)
11 users (show)

Fixed In Version: gcc-10.2.1-1.fc33.x86_64
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-01 14:19:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Preprocessed source dump from gcc (5.40 MB, text/x-csrc)
2020-07-22 14:14 UTC, Caolan McNamara
no flags Details
gdb log (4.39 KB, text/plain)
2020-07-27 11:35 UTC, Caolan McNamara
no flags Details
requested output, though debug_tree (fn) is optimized out (2.25 KB, text/plain)
2020-07-27 12:58 UTC, Caolan McNamara
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 95719 0 P1 RESOLVED [10/11 Regression] ICE in lookup_vfn_in_binfo at gcc/cp/class.c:2459 since r11-954-g0ddb93ce77374004 2020-10-08 10:44:45 UTC

Description Caolan McNamara 2020-07-22 14:14:00 UTC
Created attachment 1702093 [details]
Preprocessed source dump from gcc

Description of problem:
LibreOffice fails to rebuild from source in Fedora33 with an internal compiler error

Version-Release number of selected component (if applicable):
gcc-10.1.1-2.fc33.x86_64

How reproducible:
100%

Steps to Reproduce:
1. g++ -std=c++17 -c ccVFp5Xz.ii

Comment 1 Marek Polacek 2020-07-22 14:50:15 UTC
Can't reproduce with gcc-10.1.1-1.fc32.x86_64 or latest upstream gcc-10 or trunk.

Comment 2 Jeff Law 2020-07-24 16:38:34 UTC
I can't reproduce with gcc-10.2.1-20200723 either.

Comment 3 Caolan McNamara 2020-07-24 19:33:22 UTC
gcc-10.1.1-2.fc33.x86_64 still fails for me, but I see that

-            join();
+            salhelper::Thread::join();

makes this location not crash

Comment 4 Jakub Jelinek 2020-07-27 10:59:21 UTC
Can't reproduce either, even tried valgrind and nothing
Are you sure you can reproduce it with the given preprocessed source?
Can you see under gdb where cc1plus segfaults and print backtrace?

Comment 5 Caolan McNamara 2020-07-27 11:35:11 UTC
yeah, with the attached .ii. In my case I'm on F32 and used...

dnf --nogpg --enablerepo=rawhide debuginfo-install gcc-c++-10.1.1-2.fc33.x86_64

to install the F33 compiler (and dependencies, like the rawhide glibc, etc)

with

gdb --args g++ -std=c++17 -c ccVFp5Xz.ii
(gdb) set follow-fork-mode child
(gdb) break internal_error
(gdb) run

I get...

Comment 6 Caolan McNamara 2020-07-27 11:35:48 UTC
Created attachment 1702514 [details]
gdb log

Comment 7 Jakub Jelinek 2020-07-27 11:48:07 UTC
You could just
gdb --args /usr/libexec/gcc/x86_64-redhat-linux/10/gcc/cc1plus -std=c++17 -quiet ccVFp5Xz.ii
Can you
p debug_tree (idx)
p debug_tree (binfo)
up
p debug_tree (fn)
?
Thanks

Comment 8 Stephan Bergmann 2020-07-27 11:51:53 UTC
(In reply to Caolan McNamara from comment #6)
> Created attachment 1702514 [details]
> gdb log

...which looks suspiciously like <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719> "[10/11 Regression] ICE in lookup_vfn_in_binfo at gcc/cp/class.c:2459 since r11-954-g0ddb93ce77374004".  (I am sure I had filed it in response to a failure of building LibreOffice, although the reduced reproducer does not give a clue what the original issue in LibreOffice was.  But I'm pretty sure I'd run into an issue like that join vs. salhelper::Thread::join from comment 3 in the past, so I guess these two bugs may be the same issue?)

Comment 9 Jakub Jelinek 2020-07-27 12:10:32 UTC
If it is that, then https://bodhi.fedoraproject.org/updates/FEDORA-2020-2c6c85202d should contain that change (and rawhide has that gcc version already).

Comment 10 Caolan McNamara 2020-07-27 12:58:16 UTC
Created attachment 1702535 [details]
requested output, though debug_tree (fn) is optimized out

Comment 11 Caolan McNamara 2020-07-27 13:01:28 UTC
FWIW, the testcase of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719 fails for me.

[caolan@xps Downloads]$ rpm -q gcc-c++
gcc-c++-10.1.1-2.fc33.x86_64
[caolan@xps Downloads]$ g++ -std=c++17 -c test.cc 
test.cc: In function ‘void g(S3&)’:
test.cc:7:22: internal compiler error: Segmentation fault
    7 | void g(S3 & s) { s.f(); }
      |

Comment 12 Caolan McNamara 2020-07-27 13:38:40 UTC
both testcases, my and the one at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719, are ok with

gcc-c++-10.2.1-1.fc33.x86_64

so looks it is ok again in 10.2, while 10.1 had the problem


Note You need to log in before you can comment on or make changes to this bug.