------- Comment #9 from rguenth at gcc dot gnu dot org 2010-04-18 20:32 ------- (In reply to comment #8) > debbuging 4.3 vs 4.5 start_thread() shows different results: > > 4.3: > > 182x void thread::start_thread() > 183x { > 184x thread_info->self=thread_info; > 185t> int const res = pthread_create(&thread_info->thread_handle, 0, > &thread_proxy, thread_info.get()); > > (gdb) p *this->thread_info.pn.pi_ > { > _vptr.sp_counted_base = 0x7ffff767e6d0, > use_count_ = 1, > weak_count_ = 2 > } > (gdb) n > (gdb) p *this->thread_info.pn.pi_ > { > _vptr.sp_counted_base = 0x7ffff767e6d0, > use_count_ = 2, > weak_count_ = 2 > } > > on 4.5: > > (gdb) p *this->thread_info.pn.pi_ > { > _vptr.sp_counted_base = 0x7ffff767ead0, > use_count_ = 1, > weak_count_ = 2 > } > (gdb) n > (gdb) p *this->thread_info.pn.pi_ > Cannot access memory at address 0x30 > > as you can see, the 4.5 code does bad things.
it just means that the debugger uses a this variable which is currently NULL. So maybe wrong-debug information. The testcase is btw a too twisted maze. Can you wrap up a simple main() so that it fails at runtime? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39979