This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/13212] JNI/CNI AttachCurrentThread does not register thread with garbage collector
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 30 Mar 2006 07:00:01 -0000
- Subject: [Bug libgcj/13212] JNI/CNI AttachCurrentThread does not register thread with garbage collector
- References: <bug-13212-7355@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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