harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Yu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6361) [JDWP][Java6] Fix a problem that will result in crash if OOM happens
Date Wed, 21 Oct 2009 08:54:59 GMT

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

Jim Yu updated HARMONY-6361:

    Attachment: HARMONY-6361.diff

> [JDWP][Java6] Fix a problem that will result in crash if OOM happens
> --------------------------------------------------------------------
>                 Key: HARMONY-6361
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6361
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>            Reporter: Jim Yu
>         Attachments: HARMONY-6361.diff
> I found a problem in JDWP that will result in crash if OOM happens. In GetClassName()
method of ClassManager class, we will use the return value of GetMemoryManager().Allocate()
directly as a valid pointer to access the array element. But if the return value is invalid,
crash will happen in no doubt. A possible case like that comes into my mind. In the implementation
of  GetMemoryManager().Allocate() method, we call jvmti method Allocate() to do the real work
for the memory allocation. In normal case, the jvmti method works fine. But if the JVM memory
runs out, it will certainly return OOM error code and the pointer passed to it to get the
allocated memory address will be invalid. Then the crash would happen as I mentioned earlier.
To prevent the potential crash problem for this case, I have got a fix to solve it.

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

View raw message