harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6303) [JDWP] Fix a potential crash problem that would happen if String object is GCed
Date Mon, 17 Aug 2009 19:43:14 GMT

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

Mark Hindess updated HARMONY-6303:
----------------------------------

    Fix Version/s:     (was: 5.0M11)

Changing the "Fix Version" since this is definitely *not* must fix for 5.0M11 since it is
a patch against the 6.0 branch of jdktools.

Jim, please don't set the "Fix Version" field unless the big *must* be fixed in that version
- i.e. it is a regression or some other critical bug. Thanks. 


> [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.


Mime
View raw message