You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Eugene S. Ostrovsky (JIRA)" <ji...@apache.org> on 2007/03/27 13:05:32 UTC

[jira] Updated: (HARMONY-3505) [drlvm][jvmti] GetFieldModifiers() returns error for field declared in superclass

     [ https://issues.apache.org/jira/browse/HARMONY-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene S. Ostrovsky updated HARMONY-3505:
-----------------------------------------

    Attachment: H3505-Regression-test.patch

> [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
>         Attachments: H3505-Regression-test.patch
>
>
> 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.