jni_PushLocalFrame if test
Keith McGuigan
keith.mcguigan at oracle.com
Wed Dec 15 07:55:37 PST 2010
On Dec 15, 2010, at 10:05 AM, Salter, Thomas A wrote:
> I just stumbled upon this test in share/vm/prims/jni.cpp, line 655:
>
> if (capacity < 0 && capacity > MAX_REASONABLE_LOCAL_CAPACITY) {
> DTRACE_PROBE1(hotspot_jni, PushLocalFrame__return, JNI_ERR);
> return JNI_ERR;
> }
>
> It looks to me like that if condition is always false.
Yes, that is clearly wrong and should be || instead of &&.
Functionally, it's not really a problem as we don't end up using the
capacity parameter anyway, but it still should be fixed for
compatibility reasons. I'll file a bug for this.
--
- Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20101215/a72e4664/attachment.html
More information about the hotspot-dev
mailing list