[regression] ICE in dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861

Bug #730860 reported by Felix Geyer on 2011-03-07
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Medium
Andrew Stubbs
gcc-4.5 (Ubuntu)
High
Canonical Foundations Team
Nominated for Oneiric by Matthias Klose
Natty
High
Canonical Foundations Team

Bug Description

Binary package hint: gcc-4.5

gcc -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-long-long -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration -Wno-variadic-macros -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fPIC -m64 -Wno-sign-compare -Wno-format -Wno-bad-function-cast -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/sys -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/sys/sys -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/amd64/include -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/netinet -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/libalias -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/dnsproxy -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/build -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/include -I/tmp/buildd/virtualbox-ose-4.0.4-dfsg/out -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/share/doc/virtualbox-ose\" -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DIN_RING3 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DPIC -DIN_IDE_R3 -DVBOX_WITH_NETFLT -DVBOX_WITH_INIP -DVBOX_WITH_VDE -DVBOX_WITH_VUSB -DVBOX_WITH_USB -DVBOX_WITH_PDM_ASYNC_COMPLETION -DVBOX_WITH_SCSI -DVBOX_WITH_ALSA -DVBOX_WITH_PULSE -DVUSB_HAVE_USBPROXY_DEVICE -DVBOX_USB_WITH_SYSFS -DVBOX_SLIRP_BSD -Wp,-MD,/tmp/buildd/virtualbox-ose-4.0.4-dfsg/out/obj/Drivers/Network/slirp/bsd/kern/uipc_mbuf.o.dep -Wp,-MT,/tmp/buildd/virtualbox-ose-4.0.4-dfsg/out/obj/Drivers/Network/slirp/bsd/kern/uipc_mbuf.o -Wp,-MP -o /tmp/buildd/virtualbox-ose-4.0.4-dfsg/out/obj/Drivers/Network/slirp/bsd/kern/uipc_mbuf.o /tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c: In function 'm_adj':
/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c:1136:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
{standard input}: Assembler messages:
{standard input}:3062: Error: open CFI at the end of file; missing .cfi_endproc directive

# gcc --version
gcc (Ubuntu/Linaro 4.5.2-5ubuntu1) 4.5.2

Tested on amd64.

Related branches

summary: - virtualbox-ose fails to build due to internal compiler error
+ virtualbox-ose fails to build due to an internal compiler error
Felix Geyer (debfx) wrote :
Matthias Klose (doko) wrote :

seen on at least amd64, works with 4.5.2-3ubuntu3, and with 4.5.2-5 (without the Linaro changes). Fails with 4.5.2-5ubuntu1.

Changed in gcc-4.5 (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-11.04-beta-1
status: New → Confirmed
Matthias Klose (doko) wrote :

works with -O0, -O1, -Os and -O3.

tags: added: amd64
summary: - virtualbox-ose fails to build due to an internal compiler error
+ [regression] ICE in dwarf2out_frame_debug_adjust_cfa, at
+ dwarf2out.c:181dwarf2out_frame_debug_adjust_cfa, at
+ dwarf2out.c:1861dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861
summary: [regression] ICE in dwarf2out_frame_debug_adjust_cfa, at
- dwarf2out.c:181dwarf2out_frame_debug_adjust_cfa, at
- dwarf2out.c:1861dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861
+ dwarf2out.c:1861
Michael Hope (michaelh1) wrote :

Might be related to LP: #721023. The other bug was seen on 32 bit only, but was in the dwarf2out family of routines.

Felix Geyer (debfx) wrote :

i386 is not affected.

Michael Hope (michaelh1) wrote :

Reproduced with gcc-linaro-4.5-2011.03-0:

michaelh@crucis:~/linaro/bugs$ ~/linaro/toolchains/gcc-linaro-4.5-2011.03-0-x86_64-maverick-cbuild71-crucis-x86_64r1/bin/gcc -c -O2 -fno-omit-frame-pointer uipc_mbuf.i

/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c: In function ‘m_adj’:
/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c:1136:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Removing the -fno-omit-frame-pointer hides the problem.

The problem seems to have been introduced by the new shrink-wrap optimisation. Adding -fno-shrink-wrap stops the fault:

michaelh@crucis:~/linaro/bugs$ ~/linaro/toolchains/gcc-linaro-4.5-2011.03-0-x86_64-maverick-cbuild71-crucis-x86_64r1/bin/gcc -c -O2 -fno-omit-frame-pointer -fno-shrink-wrap uipc_mbuf.i

Changed in gcc-linaro:
status: New → Triaged
importance: Undecided → Medium
Michael Hope (michaelh1) wrote :

Set to medium as a work-around (-fno-shrink-wrap) exists.

Andy Whitcroft (apw) wrote :

The kernel seems to being affected also. Seems to affect at least amd64 and powerpc builds; i386 seems to be unaffected. amd64 build reported as below:

/build/buildd/linux-2.6.38/drivers/isdn/gigaset/isocdata.c: In function 'gigaset_isoc_buildframe':
/build/buildd/linux-2.6.38/drivers/isdn/gigaset/isocdata.c:496:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
{standard input}: Assembler messages:
{standard input}:1376: Error: open CFI at the end of file; missing .cfi_endproc directive
make[5]: *** [drivers/isdn/gigaset/isocdata.o] Error 1
make[4]: *** [drivers/isdn/gigaset] Error 2
make[3]: *** [drivers/isdn] Error 2
make[2]: *** [drivers] Error 2
make[2]: *** Waiting for unfinished jobs....

This patch comes from Bernd Schmidt, but has not been tested yet.

Andy Whitcroft (apw) wrote :

Confirmed that building with -fno-shrink-wrap allows the amd64 builds to complete successfully.

Matthias Klose (doko) wrote :

not fixed, at least on amd64, test build (currently for amd64 only) in
https://launchpad.net/~ubuntu-toolchain-r/+archive/ppa/

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.5 - 4.5.2-5ubuntu2

---------------
gcc-4.5 (4.5.2-5ubuntu2) natty; urgency=low

  * Update to SVN 20110308 (r170777) from the gcc-4_5-branch.
    - Fix PR tree-optimization/45967, PR tree-optimization/47278,
      PR target/47862, PR libgfortran/47778.
  * For Linaro based builds, do not turn on -fshrink-wrap by default with
    -O2 except for ARM native and ARM cross builds. LP: #730860.
 -- Matthias Klose <email address hidden> Tue, 08 Mar 2011 15:17:39 +0100

Changed in gcc-4.5 (Ubuntu Natty):
status: Confirmed → Fix Released
Matthias Klose (doko) wrote :

reopening, un-milestoning, disabled for natty

Changed in gcc-4.5 (Ubuntu Natty):
milestone: ubuntu-11.04-beta-1 → none
status: Fix Released → Confirmed
tags: added: patch

The attached patch from Bernd fixed the libstdc++ build failure for me (without needing -fno-shrink-wrap). I'll build a whole system image with it and see whether it works properly.

With this patch, the whole system image (including Qt and Glibmm) builds with -Os. Run-time tests to follow.

Matthias Klose (doko) wrote :

change of the -O? option shouldn't be required anymore in natty

Changed in gcc-4.5 (Ubuntu Natty):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Matthias Klose (doko) wrote :

-fshrink-wrap won't be re-enabled for natty

Changed in gcc-4.5 (Ubuntu Natty):
status: Confirmed → Won't Fix
Michael Hope (michaelh1) on 2011-03-20
tags: added: shrinkwrap
Michael Hope (michaelh1) wrote :

Might be fixed by r99486 and r99487. Will verify.

Changed in gcc-linaro:
assignee: nobody → Michael Hope (michaelh1)
Michael Hope (michaelh1) wrote :

Still fails in r99489:

michaelh@crucis:~/linaro/bugs$ ../toolchains/gcc-linaro-4.5+bzr99489-x86_64-maverick-cbuild81-crucis-x86_64r1/bin/gcc -c -O2 -fno-omit-frame-pointer uipc_mbuf.i
/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c: In function ‘m_adj’:
/tmp/buildd/virtualbox-ose-4.0.4-dfsg/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c:1136:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at dwarf2out.c:1861

Changed in gcc-linaro:
assignee: Michael Hope (michaelh1) → nobody
assignee: nobody → Andrew Stubbs (ams-codesourcery)
Michael Hope (michaelh1) wrote :

Fixed in 2011.04:

michaelh@crucis:~/linaro/bugs$ /tools/toolchains/arch/x86_64/gcc-linaro-4.5-2011.04-0-x86_64-maverick-cbuild112-crucis-x86_64r1/bin/gcc -O2 -fno-omit-frame-pointer -c uipc_mbuf.i

Changed in gcc-linaro:
milestone: none → 4.5-2011.04-0
Michael Hope (michaelh1) on 2011-04-21
Changed in gcc-linaro:
status: Triaged → Fix Committed
Michael Hope (michaelh1) on 2011-04-21
Changed in gcc-linaro:
status: Fix Committed → Fix Released
Matthias Klose (doko) wrote :

shrink-wrap now disabled everywhere

Changed in gcc-4.5 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers