harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Popov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3505) [drlvm][jvmti] GetFieldModifiers() returns error for field declared in superclass
Date Tue, 27 Mar 2007 09:50:32 GMT
[drlvm][jvmti] GetFieldModifiers() returns error for field declared in superclass
---------------------------------------------------------------------------------

                 Key: HARMONY-3505
                 URL: https://issues.apache.org/jira/browse/HARMONY-3505
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM, JDK
         Environment: Linux/ia32, Harmony-jdk-r522770
            Reporter: Ivan Popov


After HARMONY-3317 has been fixed, the same JDWP test 

  org.apache.harmony.jpda.tests.jdwp.ReferenceType.GetValues003Test 

still fail on Linux with the same error:

=> CHECK ReferenceType::GetValues command for chekedClassRefTypeID, superClassCheckedFieldID...
# ERROR: ReferenceType::GetValues command, Error Code:<25(INVALID_FIELDID)>
<...>
1) testGetValues003(org.apache.harmony.jpda.tests.jdwp.ReferenceType.GetValues003Test)junit.framework.AssertionFailedError:
ReferenceType::GetValues command, Error Code:<25(INVALID_FIELDID)>
        at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.printErrorAndFail(JDWPTestCase.java:730)
        at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.checkReplyPacket(JDWPTestCase.java:639)
        at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.checkReplyPacket(JDWPTestCase.java:568)
        at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.checkReplyPacket(JDWPTestCase.java:539)
        at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.checkReplyPacket(JDWPTestCase.java:552)
        at org.apache.harmony.jpda.tests.jdwp.ReferenceType.GetValues003Test.testGetValues003(GetValues003Test.java:118)
       at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        at org.apache.harmony.jpda.tests.jdwp.ReferenceType.GetValues003Test.main(GetValues003Test.java:145)

The problem is in another JVMTI function GetFieldModifiers():

jvmtiError
GetFieldModifiers(jvmtiEnv* env,
            jclass klass,
            jfieldID field,
            jint* modifiers_ptr)

This function returns error JVMTI_ERROR_INVALID_FIELDID if 'field' is described in a superclass
of 'klass'.
It's strange to me, but this occur only on Linux. On Windows this function works well.

Here is trace log on Linux:
 
JVMTI: [ReferenceType.cpp:406] >> jvmti->GetFieldDeclaringClass(jvmClass, jvmFieldID,
&declaringClass)
JVMTI: [ReferenceType.cpp:406] << jvmti->GetFieldDeclaringClass(jvmClass, jvmFieldID,
&declaringClass)=0
JVMTI: [ReferenceType.cpp:419] >> jvmti->GetFieldModifiers(jvmClass, jvmFieldID,
&fieldModifiers)
JVMTI: [ReferenceType.cpp:419] << jvmti->GetFieldModifiers(jvmClass, jvmFieldID,
&fieldModifiers)=25

Here is trace log on Windows:

JVMTI: [ReferenceType.cpp:406] >> jvmti->GetFieldDeclaringClass(jvmClass, jvmFieldID,
&declaringClass)
JVMTI: [ReferenceType.cpp:406] << jvmti->GetFieldDeclaringClass(jvmClass, jvmFieldID,
&declaringClass)=0
JVMTI: [ReferenceType.cpp:419] >> jvmti->GetFieldModifiers(jvmClass, jvmFieldID,
&fieldModifiers)
JVMTI: [ReferenceType.cpp:419] << jvmti->GetFieldModifiers(jvmClass, jvmFieldID,
&fieldModifiers)=0

JVMTI spec does not explicitly say that the 'field' should be described in given 'klass' and
this successfully works in RI. I think this is JVMTI problem and it should be fixed to preserve
compatibility with RI. It makes sense also to check implementation of all other JVMTI Field
functions to be sure they don't fail for fields declared in base class.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message