From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28915 invoked by alias); 7 Sep 2005 00:18:20 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 28891 invoked by uid 48); 7 Sep 2005 00:18:19 -0000 Date: Wed, 07 Sep 2005 00:18:00 -0000 From: "Hans dot Boehm at hp dot com" To: java-prs@gcc.gnu.org Message-ID: <20050907001816.23758.Hans.Boehm@hp.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/23758] New: java::lang::ConcreteProcess::nativeSpawn unsafe X-Bugzilla-Reason: CC X-SW-Source: 2005-q3/txt/msg00547.txt.bz2 List-Id: 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