[ https://issues.apache.org/jira/browse/HARMONY-6303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744937#action_12744937
]
Jim Yu commented on HARMONY-6303:
---------------------------------
You are right, Mark.
I just considered that we were discussing to use Java 6 branch JDWP in Java 5 builds. So I
suppose it would become a critical defect for Java 5 as well if we did that. So far, given
that we haven't merged Java 6 JDWP to Java 5, it is OK for me to remove the "Fix Version"
field. Anyway, thanks for pointing it out.
> [JDWP] Fix a potential crash problem that would happen if String object is GCed
> -------------------------------------------------------------------------------
>
> Key: HARMONY-6303
> URL: https://issues.apache.org/jira/browse/HARMONY-6303
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Affects Versions: 5.0M10
> Reporter: Jim Yu
> Attachments: HARMONY-6303.diff
>
>
> I found there was a potential crash problem in StringReference command set, Value command.
In the statement [1] as following shows, if the string object for which we are trying to read
its ID has been GCed actually, the string ID we retrieved would be null as a result. Hence
if we pass the null value to the follwing jni invocations [2], crash would happen. The solution
is that we should return the error code to the upper level when the string object is GCed
in this case.
> [1] jstring stringObject = m_cmdParser->command.ReadStringID(jni);
> [2] jsize len = jni->GetStringLength(stringObject);
> jsize utfLen = jni->GetStringUTFLength(stringObject);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|