From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 15 19:10:19 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B394216A4EB for ; Wed, 15 Oct 2003 19:10:19 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB5C543FAF for ; Wed, 15 Oct 2003 19:10:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9G2AFFY050804 for ; Wed, 15 Oct 2003 19:10:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9G2AF3W050803; Wed, 15 Oct 2003 19:10:15 -0700 (PDT) (envelope-from gnats) Resent-Date: Wed, 15 Oct 2003 19:10:15 -0700 (PDT) Resent-Message-Id: <200310160210.h9G2AF3W050803@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Collins Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E293516A4B3 for ; Wed, 15 Oct 2003 19:01:07 -0700 (PDT) Received: from squid-cache.org (squid-cache.org [206.168.0.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 0CA6D43F75 for ; Wed, 15 Oct 2003 19:01:07 -0700 (PDT) (envelope-from robertc@squid-cache.org) Received: (qmail 3330 invoked by uid 1012); 16 Oct 2003 02:01:05 -0000 Message-Id: <20031016020105.3329.qmail@squid-cache.org> Date: 16 Oct 2003 02:01:05 -0000 From: Robert Collins To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: gnu/58099: g++ -fhuge-objects on ix86 coredumps upon use of std::ostringstream X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Robert Collins List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2003 02:10:19 -0000 >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@squid-cache.org:/usr/obj/usr/src/sys/SQUID i386 >Description: Using g++ 2.95.4, the test case : #include 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: