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

Morris Meyer morris.meyer at oracle.com
Wed Sep 10 15:00:06 UTC 2014


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.


WEBREV - http://cr.openjdk.java.net/~morris/JDK-8050022.01/
JBS - https://bugs.openjdk.java.net/browse/JDK-8050022

More information about the hotspot-compiler-dev mailing list