This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()
- From: "appfault at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2010 18:50:42 -0000
- Subject: [Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()
- References: <bug-42733-7959@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from appfault at hotmail dot com 2010-01-13 18:50 -------
I see that it's auto-generated, but when I did so the file was only 53 lines
long. The function is assembler anyway, so I'm not sure the line numbers would
mean much.
As far as the asm goes, it loops between offsets 12, 18, 20, in that order.
Dump of assembler code for function _ZN9__gnu_cxx18__exchange_and_addEPVii:
0x0804b378 <_ZN9__gnu_cxx18__exchange_and_addEPVii+0>: push %ebp
0x0804b379 <_ZN9__gnu_cxx18__exchange_and_addEPVii+1>: mov %esp,%ebp
0x0804b37b <_ZN9__gnu_cxx18__exchange_and_addEPVii+3>: mov 0x8(%ebp),%ecx
0x0804b37e <_ZN9__gnu_cxx18__exchange_and_addEPVii+6>: mov $0x1,%eax
0x0804b383 <_ZN9__gnu_cxx18__exchange_and_addEPVii+11>: nop
0x0804b384 <_ZN9__gnu_cxx18__exchange_and_addEPVii+12>: xchg %eax,0x80bb00c
0x0804b38a <_ZN9__gnu_cxx18__exchange_and_addEPVii+18>: test %eax,%eax
0x0804b38c <_ZN9__gnu_cxx18__exchange_and_addEPVii+20>: jne 0x804b384
<_ZN9__gnu_cxx18__exchange_and_addEPVii+12>
0x0804b38e <_ZN9__gnu_cxx18__exchange_and_addEPVii+22>: mov (%ecx),%eax
0x0804b390 <_ZN9__gnu_cxx18__exchange_and_addEPVii+24>: mov (%ecx),%edx
0x0804b392 <_ZN9__gnu_cxx18__exchange_and_addEPVii+26>: add 0xc(%ebp),%edx
0x0804b395 <_ZN9__gnu_cxx18__exchange_and_addEPVii+29>: mov %edx,(%ecx)
0x0804b397 <_ZN9__gnu_cxx18__exchange_and_addEPVii+31>: movl $0x0,0x80bb00c
0x0804b3a1 <_ZN9__gnu_cxx18__exchange_and_addEPVii+41>: leave
0x0804b3a2 <_ZN9__gnu_cxx18__exchange_and_addEPVii+42>: ret
Not sure what the function is really trying to do.
--
appfault at hotmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|3.4.4 4.1.2 4.4.1 4.5.0 |3.4.4 4.1.2 4.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42733