From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14240 invoked by alias); 22 Jul 2005 16:40:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14125 invoked by uid 48); 22 Jul 2005 16:40:11 -0000 Date: Fri, 22 Jul 2005 16:40:00 -0000 Message-ID: <20050722164011.14124.qmail@sourceware.org> From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050721155650.22591.Simon.Finn@reify.co.uk> References: <20050721155650.22591.Simon.Finn@reify.co.uk> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22591] [4.0 Regression] std::swap() followed by list::erase() produces incorrect list::begin() X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg02721.txt.bz2 List-Id: ------- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-22 16:40 ------- Just another data point: I just compiled the testcase (without including iostream) with -O3 -c using 4.0 branch. If I link this with libstdc++ from the 4.0 the assertion is triggered. If I link this with libstdc++ from the 3.4 branch or mainline, the assert is not triggered. The same happens, if I use -O0 instead of -O3. nm of the object file yields: U _Unwind_Resume U _ZNSt15_List_node_base4hookEPS_ U _ZNSt15_List_node_base4swapERS_S0_ U _ZNSt15_List_node_base6unhookEv 00000000 d _ZZ4mainE19__PRETTY_FUNCTION__ U _ZdlPv U _Znwj U __assert_fail U __gxx_personality_v0 00000000 T main So a miscompilation of _List_node_base::swap (or ::hook or ::unhook) in libstdc++ seems to be very likely. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Target Milestone|--- |4.0.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22591