From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17655 invoked by alias); 7 Jan 2013 07:21:31 -0000 Received: (qmail 17572 invoked by uid 48); 7 Jan 2013 07:21:03 -0000 From: "f.heckenbach@fh-soft.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55893] C++11: runtime segfault with static const object with virtual destructor Date: Mon, 07 Jan 2013 07:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: f.heckenbach@fh-soft.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00437.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55893 --- Comment #1 from Frank Heckenbach 2013-01-07 07:21:01 UTC --- Submitted to early. Here's the description: The attached test case segfault at runtime: % g++-4.7 -std=c++11 bug.cpp && ./a.out Segmentation fault As far as I can see, that's because tmp is allocated in read-only storage, but the destructor tries to write to it to update the vtable pointer. It only happens in C++11 mode.