JDK-4756819 : JDI tests with "-Xcheck:jni" reveals Field type (static) mismatch in JNI get/set
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.0,1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,solaris_7
  • CPU: generic,sparc
  • Submitted: 2002-10-02
  • Updated: 2003-05-16
  • Resolved: 2003-05-16
Related Reports
Duplicate :  
Description

Name: tb29552			Date: 10/02/2002



Running the test/com/sun/jdi regression tests with "-Xcheck:jni"
added to the debugee command line reveals:

   FATAL ERROR in native method: Field type (static) mismatch in JNI get/set
      field operations
   Internal exception during operation:
       null

   The application has been disconnected

The following tests failed with this error on
Solaris 8/SPARC, Linux/x86, and WNT/x86

  com/sun/jdi/ArrayLengthDumpTest.sh
  com/sun/jdi/ArrayRangeTest.java
  com/sun/jdi/RedefineCrossEvent.java



======================================================================

Comments
SUGGESTED FIX ###@###.### 2003-05-07 Fix suggested by ###@###.### *** jniCheck.cpp.orig 2003-05-07 11:31:15.000000000 -0700 --- jniCheck.cpp 2003-05-07 11:31:55.000000000 -0700 *************** *** 174,182 **** } /* check for proper field type */ jniIdSupport::to_field_descriptor(fid, &fd); ! if (fd.field_type() != ftype) { ReportJNIFatalError(thr, fatal_static_field_mismatch); } } --- 174,183 ---- } /* check for proper field type */ jniIdSupport::to_field_descriptor(fid, &fd); ! if ((fd.field_type() != ftype) && ! !(fd.field_type() == T_ARRAY && ftype == T_OBJECT)) { ReportJNIFatalError(thr, fatal_static_field_mismatch); } }
11-06-2004

PUBLIC COMMENTS Name: tb29552 Date: 10/02/2002 . ======================================================================
10-06-2004

EVALUATION It's a duplicate of 4860727. ###@###.### 2003-05-16
16-05-2003