RFR(S): 8050022: linux-sparcv9: assert(SharedSkipVerify || obj->is_oop()) failed: sanity check

David Chase david.r.chase at oracle.com
Wed Sep 10 15:16:21 UTC 2014

(Not a Reviewer review)

Style question — in the stack-slot manipulating code in
src/cpu/sparc/vm/sharedRuntime_sparc.cpp, it says
    // V9ism: floats go in ODD registers
and then repeats this expression three times
   1 + (j << 1)
Perhaps it would be better to say (after the comment)
  int float_index = 1 + (j << 1);
and repeat float_index three times,
and likewise for the even index in the double case
  int double_index = (j<<1)

Other than that, I like it, especially the typos/spellos that you caught in associated files.


On 2014-09-10, at 11:00 AM, Morris Meyer <morris.meyer at oracle.com> wrote:

> Folks,
> Could I get a review for this issue?  On Linux-SPARC, in the jnistress002 test, the registers all save cleanly, and the JNI call into jniobjects() happens cleanly.  Inside the compiled JNI method, prior to the first (*env)->MonitorEnter(), the code spills the float and double arguments onto the stack, which happens to corrupt both JNIEnv *env, and jobject jobj.
> Java_nsk_stress_jni_JNIStress002_JNIter_jniobjects (JNIEnv *env, jobject jobj, jstring jstr, jint intgr,
>              jlong lng, jcharArray jChArr, jfloat flt, jdouble dbl) {
>  static int classCount = 0;
>  jobjectArray obj;
>  jobject element;
>  jclass clazz, clazzUp;
>  jmethodID methodID;
>  jfieldID classNoID;
>  const char *classname="nsk/stress/jni/JNIStress002/objectsJNI";
>  const char *name="<init>";
>  const char *sig="(Ljava/lang/String;IJ[CFD)V";
>  const char *upperClassName="nsk/stress/jni/JNIStress002/jnistress002";
>  const char *fieldName="jniStringAllocSize";
>  const char *fieldSig="I";
>  const char *setpass="halt";
>  const char *setpassSig="()V";
>  jvalue paramArr [6];
>  int kkk;
>  (*env)->MonitorEnter(env, jobj); CE
> The fix is to allocate stack spillage space for Linux SPARC machines for floating point arguments passed as registers.  I didn't touch the V8 side of this as I'm not sure if we even have a V8 machine (pre-2000) running Linux.
> Tested with JPRT and nsk.stress.
>        --morris
> WEBREV - http://cr.openjdk.java.net/~morris/JDK-8050022.01/
> JBS - https://bugs.openjdk.java.net/browse/JDK-8050022

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140910/1ec376a7/signature.asc>

More information about the hotspot-compiler-dev mailing list