public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/4066: gcj -fjni generates thread-unsafe code
@ 2001-08-20 12:56 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2001-08-20 12:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 4066
>Category: java
>Synopsis: gcj -fjni generates thread-unsafe code
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 20 12:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Tom Tromey <tromey@redhat.com>
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
The stubs generated by `gcj -fjni' are not thread-safe.
I believe the code they generate to cache the JNI method
pointer can fail in some rare situations.
(This code relies on double-checked locking, which is
known to be bad.)
One fix would be to change _Jv_LookupJNIMethod so
that it takes an additional pointer. This pointer would
point to the cache location. _Jv_LookupJNIMethod would
then be responsible for updating the cache value, which
it could do while holding a mutex.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-08-20 12:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 12:56 java/4066: gcj -fjni generates thread-unsafe code tromey
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).