java::lang::ConcreteProcess::nativeSpawn appears to call several functions that are not async-signal-safe between the fork and exec in the child, including _Jv_Malloc. This is unsafe by Posix rules. I'm unsure whether it can deadlock on Linux.
These actions should be performed before the fork() call. I don't see why that would be particularly difficult to do here. To my knowledge, the problem may never have been observed in practice. I noticed it while reading the code, and didn't want it to get lost. -- Summary: java::lang::ConcreteProcess::nativeSpawn unsafe Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: minor Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Hans dot Boehm at hp dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC build triplet: *-*-linux-gnu GCC host triplet: *-*-linux-gnu GCC target triplet: *-*-linux-gnu and others http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23758