gnu/58099: g++ -fhuge-objects on ix86 coredumps upon use of
std::ostringstream
Robert Collins
robertc at squid-cache.org
Wed Oct 15 19:10:19 PDT 2003
>Number: 58099
>Category: gnu
>Synopsis: g++ -fhuge-objects on ix86 coredumps upon use of std::ostringstream
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 15 19:10:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Robert Collins
>Release: FreeBSD 4.9-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD squid-cache.org 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #1: Tue Sep 16 13:13:50 MDT 2003 wessels at squid-cache.org:/usr/obj/usr/src/sys/SQUID i386
>Description:
Using g++ 2.95.4, the test case :
#include <sstream>
int main(int argc, char **argv)
{
std::ostringstream foo;
foo << "hello" << "hello" << std::endl;
std::cout << foo.str() ;
return 0;
}
Will coredump if the option -fhuge-objects is supplied to g++. My understanding is that their needs to be a separate libstdc++ for use when -fhuge-objects is supplied, IFF -fhuge-objects is not a no-op.
We encountered this in squid, where our configure tests for a working -fhuge-objects flag, to enable it on systems that need it. We didn't try to run the resulting program, as the c++ compiler should Do The Right Thing...
>How-To-Repeat:
Compile the above program with g++ -fhuge-objects, then run the resulting program.
>Fix:
Build a -fhuge-objects version of libstdc++ and alter the specs file to use it when appropriate. This affects previous versions of FreeBSD too... Alternatively, make -fhuge-objects on i386 a no-op, such that the std library is compatible.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list