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; 6+ 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] 6+ 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; 6+ 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] 6+ messages in thread
* [Bug libgcj/23758] java::lang::ConcreteProcess::nativeSpawn unsafe
[not found] <bug-23758-6957@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2007-04-09 17:40 ` daney at gcc dot gnu dot org
@ 2007-04-09 17:49 ` daney at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-04-09 17:49 UTC (permalink / raw)
To: java-prs
------- Comment #4 from daney at gcc dot gnu dot org 2007-04-09 18:49 -------
Fixed on the trunk.
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23758
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/23758] java::lang::ConcreteProcess::nativeSpawn unsafe
[not found] <bug-23758-6957@http.gcc.gnu.org/bugzilla/>
2005-11-08 21:20 ` daney at gcc dot gnu dot org
2007-04-06 16:53 ` daney at gcc dot gnu dot org
@ 2007-04-09 17:40 ` daney at gcc dot gnu dot org
2007-04-09 17:49 ` daney at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-04-09 17:40 UTC (permalink / raw)
To: java-prs
------- Comment #3 from daney at gcc dot gnu dot org 2007-04-09 18:40 -------
Subject: Bug 23758
Author: daney
Date: Mon Apr 9 18:40:20 2007
New Revision: 123676
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123676
Log:
PR libgcj/23758
* java/lang/natPosixProcess.cc (nativeSpawn): Move building of
environment before the fork.
* testsuite/libjava.lang/Process_7.java: New test.
* testsuite/libjava.lang/Process_7.out: Its expected results.
* testsuite/libjava.lang/Process_7.jar: Generated file.
Added:
trunk/libjava/testsuite/libjava.lang/Process_7.jar (with props)
trunk/libjava/testsuite/libjava.lang/Process_7.java
trunk/libjava/testsuite/libjava.lang/Process_7.out
Modified:
trunk/libjava/ChangeLog
trunk/libjava/java/lang/natPosixProcess.cc
Propchange: trunk/libjava/testsuite/libjava.lang/Process_7.jar
('svn:mime-type' added)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23758
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/23758] java::lang::ConcreteProcess::nativeSpawn unsafe
[not found] <bug-23758-6957@http.gcc.gnu.org/bugzilla/>
2005-11-08 21:20 ` daney at gcc dot gnu dot org
@ 2007-04-06 16:53 ` daney at gcc dot gnu dot org
2007-04-09 17:40 ` daney at gcc dot gnu dot org
2007-04-09 17:49 ` daney at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-04-06 16:53 UTC (permalink / raw)
To: java-prs
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |daney at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-07 00:49:54 |2007-04-06 17:53:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23758
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/23758] java::lang::ConcreteProcess::nativeSpawn unsafe
[not found] <bug-23758-6957@http.gcc.gnu.org/bugzilla/>
@ 2005-11-08 21:20 ` daney at gcc dot gnu dot org
2007-04-06 16:53 ` daney at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-11-08 21:20 UTC (permalink / raw)
To: java-prs
------- Comment #2 from daney at gcc dot gnu dot org 2005-11-08 21:20 -------
Could someone elaborate?
If the child is killed, it is dead and it did not matter anyhow.
The child is not going to be getting random async signals.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23758
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-09 17:49 UTC | newest]
Thread overview: 6+ 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
[not found] <bug-23758-6957@http.gcc.gnu.org/bugzilla/>
2005-11-08 21:20 ` daney at gcc dot gnu dot org
2007-04-06 16:53 ` daney at gcc dot gnu dot org
2007-04-09 17:40 ` daney at gcc dot gnu dot org
2007-04-09 17:49 ` daney 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).