From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16521 invoked by alias); 14 Jun 2012 16:16:39 -0000 Received: (qmail 16509 invoked by uid 22791); 14 Jun 2012 16:16:37 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 16:16:23 +0000 From: "s_gccbugzilla at nedprod dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53455] boost::python segfault Date: Thu, 14 Jun 2012 16:16: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: s_gccbugzilla at nedprod dot com X-Bugzilla-Status: RESOLVED 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: 2012-06/txt/msg00931.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53455 --- Comment #22 from Niall Douglas 2012-06-14 16:16:19 UTC --- (In reply to comment #20) > That wouldn't help if you built one object with -std=c++11 and another with > -std=c++98 and linked them both into the same .so, you'd have the symbol, but > wouldn't have built everything with -std=c++11 > > Anyway, it's the same bug, it happens when passing a std::pair between c++11 > code and c++98 code and if you make the std::pair move-ctor trivial then > there's no crash. You miss my point: If built under C++03, a magic symbol __gplusplus_cplusplus_03 might be emitted; if built under C++11, a magic symbol __gplusplus_cplusplus_11 might be emitted. You can then tell if mixed build object files have been combined - and you can also tell if a given binary is pure. ld can then be patched to emit a warning if both symbols appear in the same binary. After all, mixing C++03 and C++11 is likely bad for your health forever into the future. Indeed, if it becomes a fatal problem for a lot of end users, gcc may need to mangle things specially for C++11 versus C++03 code for code so affected in order to prevent bad linking. The loss of std::pair interop between C++03 and C++11 in my mind is pretty fatal for a lot of end users. I can submit a wishlist issue for GCC for the above if it doesn't already exist? Niall