[regression] cone ftbfs on armel/armhf using GCC 4.7

Bug #1065559 reported by Matthias Klose
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Medium
Matthew Gretton-Dann
gcc
Fix Released
Medium
cone (Ubuntu)
Confirmed
High
Unassigned
Quantal
Won't Fix
Undecided
Unassigned
gcc-4.7 (Ubuntu)
Fix Released
Medium
Unassigned
Quantal
Won't Fix
Medium
Unassigned

Bug Description

g++-4.7 -c -g -O[123] myserver.ii
myserver.C: In static member function 'static bool myServer::eventloop(myServer::Callback*)':
myserver.C:168:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x003b90ae in free_scc_vn() ()
(gdb) bt
#0 0x003b90ae in free_scc_vn() ()
#1 0x003aee44 in ?? ()
#2 0x003aee44 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Tags: ftbfs
Revision history for this message
Matthias Klose (doko) wrote :
Revision history for this message
In , Doko-v (doko-v) wrote :

Created attachment 28426
preprocessed source

seen building the cone package on arm-linux-gnueabi, works with 4.6 branch, fails with 4.7.

g++-4.7 -c -g -O[123] myserver.ii
myserver.C: In static member function 'static bool myServer::eventloop(myServer::Callback*)':
myserver.C:168:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x003b90ae in free_scc_vn() ()
(gdb) bt
#0 0x003b90ae in free_scc_vn() ()
#1 0x003aee44 in ?? ()
#2 0x003aee44 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Changed in gcc:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Rguenth (rguenth) wrote :

Please also check trunk.

Revision history for this message
In , Doko-v (doko-v) wrote :

trunk 20120820 and 20121008 do work.

Revision history for this message
In , Mikpe (mikpe) wrote :

I can reproduce the ICE with gcc-4.7.2 on armv5tel-linux-gnueabi, sparc64-linux -m32, x86_64-linux -m32, and m68k-linux. I haven't checked any other targets.

The ICE stopped on trunk with Richard B's "Make gsi_remove return whether EH cleanup is required" patch in r186159:
http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00202.html
http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00108.html

Backporting r186159 and the follow-up fix in r186164 to gcc-4.7.2 eliminates the ICE there for the four targets mentioned above.

The description of Richard's patch makes it sound more like a cleanup than a bug fix, so I'm not sure if it actually fixes the bug or just masks it.

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

Thank you for the bug report. I've confirmed this with gcc-linaro-4.7-2012.10 on ARM:

g++ -c [-g] -O[123] myserver.ii
myserver.C: In static member function ‘static bool myServer::eventloop(myServer::Callback*)’:
myserver.C:168:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.launchpad.net/gcc-linaro> for instructions.

Changed in gcc-linaro:
status: New → Confirmed
Revision history for this message
In , Zhenqiang Chen (zhenqiang-chen) wrote :

Created attachment 28512
gdb backtrace

Root cause:

PRE bases on the result of value numbering (run_scc_vn). At the end, it free_scc_vn. But before free_scc_vn, it might call cleanup_tree_cfg ();

  if (do_eh_cleanup || do_ab_cleanup)
    cleanup_tree_cfg ();

cleanup_tree_cfg might call make_ssa_name which might reuse some "name" from the FREE_SSANAMES list. If the VN_INFO of the "name" is NULL, free_scc_vn will "Segmentation fault".

Richard's patch makes "do_eh_cleanup" to false. So cleanup_tree_cfg is not called in PRE. Then no new ssa name will be created.

bt.log shows the gdb backtrace to create a new ssa name.

Revision history for this message
In , Rguenth (rguenth) wrote :

Mine.

Revision history for this message
In , Rguenth (rguenth) wrote :

Created attachment 28517
patch

Patch I am testing.

Revision history for this message
In , Rguenth (rguenth) wrote :

Author: rguenth
Date: Thu Oct 25 11:05:43 2012
New Revision: 192803

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192803
Log:
2012-10-25 Richard Biener <email address hidden>

 PR tree-optimization/54902
 * tree-ssa-pre.c (fini_pre): Return TODO.
 (execute_pre): Adjust.
 * tree-ssa-tailmerge.c (tail_merge_optimize): Delete unreachable
 blocks before computing dominators.

 * g++.dg/torture/pr54902.C: New testcase.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/torture/pr54902.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-ssa-pre.c
    branches/gcc-4_7-branch/gcc/tree-ssa-tail-merge.c

Revision history for this message
In , Rguenth (rguenth) wrote :

Author: rguenth
Date: Thu Oct 25 11:16:12 2012
New Revision: 192804

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192804
Log:
2012-10-25 Richard Biener <email address hidden>

 PR tree-optimization/54902
 * tree-ssa-pre.c (fini_eliminate): Return TODO.
 (do_pre): Adjust.
 (execute_fre): Likewise.
 * tree-ssa-tailmerge.c (tail_merge_optimize): Delete unreachable
 blocks before computing dominators.

 * g++.dg/torture/pr54902.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr54902.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-pre.c
    trunk/gcc/tree-ssa-tail-merge.c

Revision history for this message
In , Rguenth (rguenth) wrote :

Fixed.

Matthias Klose (doko)
Changed in gcc-4.7 (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Changed in gcc-4.7 (Ubuntu Quantal):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.7 - 4.7.2-5ubuntu2

---------------
gcc-4.7 (4.7.2-5ubuntu2) raring; urgency=low

  * Merge with Debian.

gcc-4.7 (4.7.2-5) UNRELEASED; urgency=low

  * Update to SVN 20121025 (r192803) from the gcc-4_7-branch.
    - Fix PR target/54892 (ARM, LP: #1065122), PR rtl-optimization/54870,
      PR rtl-optimization/53701, PR target/53975 (ia64),
      PR tree-optimization/54902 (LP: #1065559), PR middle-end/54945.

  [ Matthias Klose ]
  * Update the Linaro support to the 4.7-2012.10 release.
  * Define MULTIARCH_DIRNAME for arm64 (Wookey).
  * Let the lib*objc-dev packages depend on the lib*gcc-dev packages.
  * Let the libstdc++-dev package depend on the libgcc-dev package.
  * Drop the dependency of the libstdc++-dev package on g++, make
    libstdc++-dev and libstdc++-pic Multi-Arch: same. Closes: #678623.
  * Install override files before calling dh_fixperms.
  * Backport the libffi arm64 port.
  * Build libx32gcc-dev, libx32objc-dev and libx32gfortran-dev packages.
  * Allow conditional building of the x32 multilibs.
  * Fix libmudflap build failure for x32 multilibs.
  * Fix dependency on glibc for triarch builds.
  * Add build-{arch,indep} targets.
  * Fix libquadmath x32 multilib builds on kernels which don't support x32.
  * Fix location of x32 specific C++ header files.

  [ Thibaut Girka ]
  * Split out lib*gcc-dev packages.
  * Split out lib*objc-dev packages.
  * Split out lib*gfortran-dev packages.

  [ Daniel Schepler ]
  * Add support for x32. Closes: #667005.
  * New patch hjl-x32-gcc-4_7-branch.diff to incorporate changes from
    that branch, including --with-abi=mx32 option.

  [ Marcin Juszkiewicz ]
  * lib*-dev packages for cross builds are not Multi-Arch: same. LP: #1070694.
 -- Matthias Klose <email address hidden> Thu, 25 Oct 2012 13:31:07 +0200

Changed in gcc-4.7 (Ubuntu):
status: In Progress → Fix Released
Changed in gcc-linaro:
status: Confirmed → In Progress
importance: Undecided → Medium
assignee: nobody → Matthew Gretton-Dann (matthew-gretton-dann)
Changed in gcc:
status: New → Fix Released
Revision history for this message
Michael Hope (michaelh1) wrote :

In the release branch. Will be picked up as part of the merge.

Changed in gcc-linaro:
milestone: none → 4.7-2012.11
Changed in gcc-linaro:
milestone: 4.7-2012.11 → 4.7-2012.12
status: In Progress → Fix Committed
Changed in gcc-linaro:
milestone: 4.7-2012.12 → 4.7-2012.11
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cone (Ubuntu Quantal):
status: New → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in gcc-4.7 (Ubuntu Quantal):
status: In Progress → Won't Fix
Rolf Leggewie (r0lf)
Changed in cone (Ubuntu Quantal):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.