From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1408 invoked by alias); 22 May 2009 00:54:23 -0000 Received: (qmail 27927 invoked by uid 48); 22 May 2009 00:54:09 -0000 Date: Fri, 22 May 2009 00:54:00 -0000 Message-ID: <20090522005409.27926.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/40094] FAIL: ext/throw_allocator/deallocate_global.cc execution test In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "danglin at gcc dot gnu dot org" 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: 2009-05/txt/msg01848.txt.bz2 ------- Comment #6 from danglin at gcc dot gnu dot org 2009-05-22 00:54 ------- The backtrace from the second delete is: (gdb) bt #0 operator delete (p=0x800000010000e530) at deallocate_global.cc:51 #1 0x400000000000de94 in __gnu_cxx::new_allocator > > >::deallocate ( this=0x8000000100002938, __p=0x800000010000e530) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/ext/new_allocator.h:95 #2 0x400000000000d904 in std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_put_node ( this=0x8000000100002938, __p=0x800000010000e530) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_tree.h:363 #3 0x400000000000cf38 in std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_destroy_node (this=0x8000000100002938, __p=0x800000010000e530) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_tree.h:384 #4 0x400000000000c124 in std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_erase ( this=0x8000000100002938, __x=0x800000010000e530) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_tree.h:968 #5 0x400000000000d488 in std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::clear ( this=0x8000000100002938) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_tree.h:722 #6 0x400000000000cd28 in std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::erase ( this=0x8000000100002938, __first={_M_node = 0x800000010000e530}, __last= {_M_node = 0x8000000100002940}) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_tree.h:1377 #7 0x400000000000bef4 in std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::erase ( this=0x8000000100002938, __x=@0x800003fffdff0fe0) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_tree.h:1366 #8 0x400000000000b210 in std::map, std::less, std::allocator > > >::erase (this=0x8000000100002938, __x=@0x800000010000e530) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/stl_map.h:582 #9 0x4000000000009ea4 in __gnu_cxx::throw_allocator_base::erase ( p=0x800000010000e4f8, size=35) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/ext/throw_allocator.h:180 #10 0x400000000000e8cc in __gnu_cxx::throw_allocator::deallocate ( this=0x800003fffdff0f20, __p=0x800000010000e4f8 "", __n=35) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/ext/throw_allocator.h:334 #11 0x400000000000e35c in std::basic_string, __gnu_cxx::throw_allocator >::_Rep::_M_destroy (this=0x800000010000e4f8, __a=@0x800003fffdff0de8) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/basic_string.tcc:426 #12 0x400000000000efe0 in std::basic_string, __gnu_cxx::throw_allocator >::_Rep::_M_dispose (this=0x800000010000e4f8, __a=@0x800003fffdff0de8) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/basic_string.h:231 #13 0x400000000000ed6c in ~basic_string (this=0x8000000100001580) at /test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/basic_string.h:498 #14 0x400000000000eca0 in __static_initialization_and_destruction_0 ( __initialize_p=0, __priority=65535) at deallocate_global.cc:68 #15 0x400000000000f0a8 in global destructors keyed to _Znwm () at deallocate_global.cc:73 #16 0x4000000000008bc4 in __do_global_dtors_aux () #17 0xc000000000032aa0 in TE_do_list#HLO_CL_#i1_0x0 () from /usr/lib/pa20_64/dld.sl #18 0xc00000000000d198 in TE_do_program_exit () from /usr/lib/pa20_64/dld.sl #19 0x800003fffdcd762c in exit () from /lib/pa20_64/libc.2 #20 0xc00000000000b394 in UT_exit () from /usr/lib/pa20_64/dld.sl #21 0xc00000000000b3b4 in exit () from /usr/lib/pa20_64/dld.sl #22 0xc00000000000b478 in $START$ () from /usr/lib/pa20_64/dld.sl void deallocate(pointer __p, size_type __n) { erase(__p, sizeof(value_type) * __n); std::allocator().deallocate(__p, __n); } It originates from the call to erase in throw_allocator.h. It would appear that the call to delete arising from the call to erase is the unexpected one. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40094