------- Comment #13 from pluto at agmk dot net 2006-08-10 09:58 ------- in fact it was a gcc bug.
gcc version 4.1.2 20060530 gives wrong code. gcc version 4.1.2 20060712 gives correct code. tree dump shows that gcc-20060530 removes some parts [*] of vector_base initialization and finally crash during freeing invalid pointer. --- ok/bug.cpp.t97.final_cleanup 2006-08-10 11:48:19.769723000 +0200 +++ err/bug.cpp.t97.final_cleanup 2006-08-10 11:47:33.802850250 +0200 - l.D.11626._M_node._M_data._M_next = &l.D.11626._M_node._M_data; - l.D.11626._M_node._M_data._M_prev = &l.D.11626._M_node._M_data; - v.D.12155._M_start = 0B; <== [*] - v.D.12155._M_end_of_storage._M_data = 0B; <== [*] - v.D.12155._M_finish = 0B; <== [*] + l.D.11607._M_node._M_data._M_next = &l.D.11607._M_node._M_data; + l.D.11607._M_node._M_data._M_prev = &l.D.11607._M_node._M_data; -- pluto at agmk dot net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27156