Bug 156240 - Complex C++ type causes ld segfault.
Summary: Complex C++ type causes ld segfault.
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Development (show other bugs)
Version: Final
Hardware: x86-64 SuSE Linux 10.0
: P5 - None : Normal
Target Milestone: SUSE Linux 10.1
Assignee: Andreas Schwab
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-08 20:30 UTC by Eelis -
Modified: 2006-03-09 17:21 UTC (History)
1 user (show)

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
test case (2.27 KB, text/plain)
2006-03-08 20:31 UTC, Eelis -
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eelis - 2006-03-08 20:30:03 UTC
Attempting to compile and link the attached (valid) C++ program using "g++ t.cpp" results in the following error:

  collect2: ld terminated with signal 11 [Segmentation fault]

I've been able to reproduce it on two SUSE 10.0 systems:

  Linux groen 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux
  gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
  GNU ld version 2.16.91.0.2 20050720 (SuSE Linux)

and:

  Linux rood 2.6.13-15.7-default #1 Tue Nov 29 14:32:29 UTC 2005 i686 athlon i386 GNU/Linux
  gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
  GNU ld version 2.16.91.0.2 20050720 (SuSE Linux)
  
I've /not/ been able to reproduce it on the following two non-SUSE machines:

  Linux lilo 2.6.12-1.1372_FC3 #1 Fri Jul 15 00:59:10 EDT 2005 i686 i686 i386 GNU/Linux
  gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
  GNU ld version 2.15.92.0.2 20040927

and:

  FreeBSD xs2.xs4all.nl 4.10-RELEASE-p2 FreeBSD 4.10-RELEASE-p2 #2: Mon Apr 18 16:45:47 CEST 2005
  gcc version 2.95.4 20020320 [FreeBSD]
  GNU ld version 2.12.1 [FreeBSD] 2002-07-20

On these, the program compiles, links, and runs fine.

I think it has to do with the mangled symbol size, as making the type less complex causes the problem to disappear. Types this complex are not (at all) uncommon in C++ template metaprogramming, so it's not an acedemic problem.
Comment 1 Eelis - 2006-03-08 20:31:06 UTC
Created attachment 71860 [details]
test case
Comment 2 Andreas Schwab 2006-03-09 17:21:38 UTC
Fixed.