Bug 1540549

Summary: gcc: ICE in dwarf2out_var_location related to CET and sigsetjmp
Product: [Fedora] Fedora Reporter: Kamil Dudka <kdudka>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, davejohansen, fweimer, jakub, jwakely, kdudka, law, mpolacek, nickc, paul
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-8.0.1-0.13.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-13 09:07:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
bz1540549.i none

Description Kamil Dudka 2018-01-31 11:39:13 UTC
Version-Release number of selected component (if applicable):
annobin-3.3-1.fc28


Steps to Reproduce:
1. koji build --arch=x86_64 --scratch rawhide 'git://pkgs.fedoraproject.org/curl?#cbbefe6fb95979859c4be9a5d92a74419211cbbb'


Actual results:
[...]
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_END            | annobin: Generate per-function annotations
during RTL pass: final
../../../tests/server/tftpd.c: In function 'recvtftp.isra.3':
../../../tests/server/tftpd.c:1404:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:26542
 }
 ^
[...]


Expected results:
curl-7.58.0-2.fc28 built as it did a week ago (no changes in curl since then):
https://koji.fedoraproject.org/koji/buildinfo?buildID=1020500


Additional info:
https://kojipkgs.fedoraproject.org//work/tasks/4198/24594198/build.log

Comment 1 Florian Weimer 2018-01-31 11:44:07 UTC
The build log shows an earlier problem, probably unrelated:

extracting debug info from /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/bin/curl.minimal
extracting debug info from /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/lib64/libcurl.so.4.5.0.minimal
/usr/bin/gdb-add-index: line 61: 22137 Aborted                 (core dumped) $GDB --batch -nx -iex 'set auto-load no' -ex "file $file"
 -ex "save gdb-index $dir"
gdb-add-index: gdb error generating index for /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/lib64/libcurl.so.4.5.0
/usr/bin/gdb-add-index: line 61: 22133 Aborted                 (core dumped) $GDB --batch -nx -iex 'set auto-load no' -ex "file $file" -ex "save gdb-index $dir"
gdb-add-index: gdb error generating index for /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/lib64/libcurl.so.4.5.0.minimal 
/usr/lib/rpm/sepdebugcrcfix: Updated 4 CRC32s, 0 CRC32s did match.
7491 blocks

Comment 2 Florian Weimer 2018-01-31 11:52:34 UTC
Created attachment 1388908 [details]
bz1540549.i

Compile with: -mcet -g -O2 -fcf-protection=full

-mcet -fcf-protection=full is required to trigger this bug.

Comment 3 Florian Weimer 2018-01-31 12:04:43 UTC
(In reply to Florian Weimer from comment #1)
> The build log shows an earlier problem, probably unrelated:
> 
> extracting debug info from
> /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/bin/curl.minimal
> extracting debug info from
> /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/lib64/libcurl.so.4.5.
> 0.minimal
> /usr/bin/gdb-add-index: line 61: 22137 Aborted                 (core dumped)
> $GDB --batch -nx -iex 'set auto-load no' -ex "file $file"
>  -ex "save gdb-index $dir"
> gdb-add-index: gdb error generating index for
> /builddir/build/BUILDROOT/curl-7.58.0-2.fc28.x86_64/usr/lib64/libcurl.so.4.5.
> 0

Filed separately as bug 1540559.

Comment 4 Kamil Dudka 2018-01-31 13:38:08 UTC
Thanks for the quick response on this!

Comment 5 Kamil Dudka 2018-02-01 12:35:58 UTC
I have pushed the following workaround to make curl build again:

https://src.fedoraproject.org/cgit/rpms/curl.git/commit/?id=bf966a95

Comment 6 Jakub Jelinek 2018-02-13 09:07:01 UTC
Should be fixed in gcc-8.0.1-0.13.fc28.

Comment 7 Kamil Dudka 2018-02-13 10:45:10 UTC
Thanks!  I have successfully built curl-7.58.0-5.fc28 without the workaround.