harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Berezhniuk (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5235) [drlvm][thread] Thread arguments are prepared/processed incorrectly
Date Fri, 30 Nov 2007 17:00:43 GMT

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

Ilya Berezhniuk updated HARMONY-5235:

    Attachment: H-5235.patch

Suggested fix is attached.

> [drlvm][thread] Thread arguments are prepared/processed incorrectly
> -------------------------------------------------------------------
>                 Key: HARMONY-5235
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5235
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5235.patch
> When investigating HARMONY-5167 (see Bounds Checker logs in 5167), I've found 2 bugs
in processing of arguments passed to newly created threads.
> 1) hythread_create_ex() function always casts thread argument to hythread_start_proc_data_t
and fills 4 fields in this structure.
> Looks like this was made for the case when wrapper function is NULL, to fill allocated
data needed to start thread with its own hythread_wrapper_start_proc function.
> The memory for hythread_start_proc_data_t is allocated under "if (!wrapper)", but fields
are filled out always.
> On the other hand, the data passed with non-NULL wrapper pointer can differ from hythread_start_proc_data_t;
it's often (void*)[2] array or something else.
> So writing 4 fields to this pointer leads to writing data to unallocated memory.
> 2) jthread_wrapper_start_proc always frees an argument passed to it.
> But Java_java_lang_VMThreadManager_start() and jvmtiRunAgentThread() functions pass local
structure instances to this function.
> I guess the structure should be allocated in these functions.

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

View raw message