public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/23758] New: java::lang::ConcreteProcess::nativeSpawn unsafe
@ 2005-09-07  0:18 Hans dot Boehm at hp dot com
  2005-09-07  0:50 ` [Bug libgcj/23758] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: Hans dot Boehm at hp dot com @ 2005-09-07  0:18 UTC (permalink / raw)
  To: java-prs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libgcj/23758] java::lang::ConcreteProcess::nativeSpawn unsafe
  2005-09-07  0:18 [Bug libgcj/23758] New: java::lang::ConcreteProcess::nativeSpawn unsafe Hans dot Boehm at hp dot com
@ 2005-09-07  0:50 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-07  0:50 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-07 00:49 -------
Confirmed based on:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|*-*-linux-gnu               |
   GCC host triplet|*-*-linux-gnu               |
 GCC target triplet|*-*-linux-gnu and others    |POSIX
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-07 00:49:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23758


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-07  0:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-07  0:18 [Bug libgcj/23758] New: java::lang::ConcreteProcess::nativeSpawn unsafe Hans dot Boehm at hp dot com
2005-09-07  0:50 ` [Bug libgcj/23758] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).