This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: CNI changes (Was: Binary Compatibility)
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Anthony Green <green at redhat dot com>, java at gcc dot gnu dot org
- Date: Mon, 4 Aug 2003 11:47:50 +0100
- Subject: Re: CNI changes (Was: Binary Compatibility)
- References: <Pine.LNX.4.44.0307300929080.11078-100000@ops2.one-point.com><87smoot8xw.fsf@fleche.redhat.com><16167.60120.49100.864112@cuddles.cambridge.redhat.com><1059964034.4179.643.camel@escape><87k79uoxfk.fsf@fleche.redhat.com>
Tom Tromey writes:
> >>>>> "Anthony" == Anthony Green <green@redhat.com> writes:
>
> Anthony> For instance, conforming to the new C++ ABI (padding-wise),
> Anthony> and wasn't there talk at some point of requiring explicit GC
> Anthony> markers for data?
>
> Requiring root registration is on my wish-list.
Ah, yes. This would be another CNI issue, I suppose.
I guess we can use C++ static initializers to register static roots
automatically? So, it would just be
static_ref<java::lang::Object> foo;
> Ideally in 3.5 we could come out with an ABI we could support well
> into the future. I'm not sure whether that is completely possible,
> but we can try.
My best guess is that 3.5 will be the draft gcj ABI, with
>
> There's a minor ABI change we need to make in JNI; see PR 4066.
"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.)"
What is wrong with the current scheme?
Andrew.