Review Request: Zero JNI handles fix
Gary Benson
gbenson at redhat.com
Thu Apr 22 04:14:47 PDT 2010
Gary Benson wrote:
> Gary Benson wrote:
> > Keith McGuigan wrote:
> > > On 03/30/10 05:52, Christian Thalinger wrote:
> > > > On Mon, 2010-03-29 at 16:24 +0100, Gary Benson wrote:
> > > > > Zero will exit with an error when invoked with -Xcheck:jni.
> > > > > This webrev fixes:
> > > > >
> > > > > http://cr.openjdk.java.net/~gbenson/zero-jnihandles-fix/
> > > > >
> > > > > Note that this is actually a pretty old issue, but the fix
> > > > > for it got lost from the IcedTea repositories. There's more
> > > > > information here:
> > > > >
> > > > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=323
> > > > >
> > > > > I don't have a bug id for this.
> > > >
> > > > 6939182: Zero JNI handles fix
> > > >
> > > > I guess the changes are good since it uses an #ifdef. Maybe one
> > > > of the runtime guys could also comment on this one.
> > >
> > > It would be better to put this in zero-specific code somewhere
> > > instead of polluting common code with #ifdef, but if that's not
> > > possible...
> > >
> > > Also, instead of this point-fix in jniHandles, why not fix
> > > last_Java_sp() to return zero_stack()->sp() in the zero case?
> > > This is not the only place last_Java_sp() is called. Might
> > > want to fix it for last_Java_pc() (and related) too.
> >
> > The difficulty is that what last_Java_sp is returning in Zero is the
> > Zero frame pointer, which is not the highest thing on the stack. It
> > probably isn't the best thing to #ifdef this here though, I agree.
> > I'll have a think about it...
>
> I've reworked the fix:
>
> http://cr.openjdk.java.net/~gbenson/zero-jnihandles-fix-2/
>
> last_Java_sp() now returns the actual Zero stack pointer. The frame
> anchor has a new last_Java_fp field that stores the value previously
> stored in last_Java_sp, in much the same way as the x86 port does.
>
> Note that the code in frame_zero.* already stored both these values,
> but with the names confusingly reversed. I have unreversed them in
> this webrev. I have also changed the type of the frame pointer be a
> ZeroFrame* -- leaving the stack pointer as an intptr_t* -- to help
> ensure that everything gets the arguments in the right order.
A minor update:
http://cr.openjdk.java.net/~gbenson/zero-jnihandles-fix-3/
Cheers,
Gary
--
http://gbenson.net/
More information about the hotspot-compiler-dev
mailing list