From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20649 invoked by alias); 30 Mar 2006 07:00:03 -0000 Received: (qmail 20441 invoked by uid 48); 30 Mar 2006 07:00:01 -0000 Date: Thu, 30 Mar 2006 07:00:00 -0000 Message-ID: <20060330070001.20440.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libgcj/13212] JNI/CNI AttachCurrentThread does not register thread with garbage collector In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "mckinlay at redhat dot com" 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 X-SW-Source: 2006-q1/txt/msg00463.txt.bz2 List-Id: ------- Comment #30 from mckinlay at redhat dot com 2006-03-30 07:00 ------- Created an attachment (id=11161) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11161&action=view) patch implementing GC_register_my_thread Here's a patch that fixes this by adding functions to the GC that allow thread registration directly from JNI_AttachCurrentThread. Aside from being fragile, solutions that rely on intercepting pthread_create are problematic because the GC will attempt to suspend other non-Java threads (see rh bug 180637 for an example) This patch has been tested sucessfully with openoffice.org. -- mckinlay at redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |mckinlay at redhat dot com |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13212