You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Gregory Shimansky (JIRA)" <ji...@apache.org> on 2006/09/11 15:54:22 UTC

[jira] Created: (HARMONY-1426) [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors

[drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors
-----------------------------------------------------------------------------------------------

                 Key: HARMONY-1426
                 URL: http://issues.apache.org/jira/browse/HARMONY-1426
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Gregory Shimansky


Array of monitors created by function GetOwnedMonitorsInfo can be freed with Deallocate JVMTI function. This array is taken from Thread Manager by calling jthread_get_owned_monitors. But Thread Manager uses APR pools for allocating memory for this array. So when JVMTI agent tries to use Deallocate on the array pointer the program usually crashes since the pointer was not allocated by JVMTI Allocate.

Inside of JVMTI implementation Allocate simply calls malloc. So to solve this prooblem it is enough to change Thread Manager allocator to malloc. I've done this fix in the same way as other functions in this file seem to be fixed.

Ugly tabs formatting is not fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-1426) [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1426?page=all ]

Geir Magnusson Jr resolved HARMONY-1426.
----------------------------------------

    Resolution: Fixed

committed in r446791

tested on ubuntu - smoke and c-unit passs, lingering bugs in kernel

> [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1426
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1426
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>         Assigned To: Geir Magnusson Jr
>         Attachments: jvmti-thread.patch
>
>
> Array of monitors created by function GetOwnedMonitorsInfo can be freed with Deallocate JVMTI function. This array is taken from Thread Manager by calling jthread_get_owned_monitors. But Thread Manager uses APR pools for allocating memory for this array. So when JVMTI agent tries to use Deallocate on the array pointer the program usually crashes since the pointer was not allocated by JVMTI Allocate.
> Inside of JVMTI implementation Allocate simply calls malloc. So to solve this prooblem it is enough to change Thread Manager allocator to malloc. I've done this fix in the same way as other functions in this file seem to be fixed.
> Ugly tabs formatting is not fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-1426) [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1426?page=all ]

Gregory Shimansky updated HARMONY-1426:
---------------------------------------

    Attachment: jvmti-thread.patch

Patch to fix the problem.

> [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1426
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1426
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>         Attachments: jvmti-thread.patch
>
>
> Array of monitors created by function GetOwnedMonitorsInfo can be freed with Deallocate JVMTI function. This array is taken from Thread Manager by calling jthread_get_owned_monitors. But Thread Manager uses APR pools for allocating memory for this array. So when JVMTI agent tries to use Deallocate on the array pointer the program usually crashes since the pointer was not allocated by JVMTI Allocate.
> Inside of JVMTI implementation Allocate simply calls malloc. So to solve this prooblem it is enough to change Thread Manager allocator to malloc. I've done this fix in the same way as other functions in this file seem to be fixed.
> Ugly tabs formatting is not fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-1426) [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1426?page=all ]

Geir Magnusson Jr closed HARMONY-1426.
--------------------------------------


> [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1426
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1426
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>         Assigned To: Geir Magnusson Jr
>         Attachments: jvmti-thread.patch
>
>
> Array of monitors created by function GetOwnedMonitorsInfo can be freed with Deallocate JVMTI function. This array is taken from Thread Manager by calling jthread_get_owned_monitors. But Thread Manager uses APR pools for allocating memory for this array. So when JVMTI agent tries to use Deallocate on the array pointer the program usually crashes since the pointer was not allocated by JVMTI Allocate.
> Inside of JVMTI implementation Allocate simply calls malloc. So to solve this prooblem it is enough to change Thread Manager allocator to malloc. I've done this fix in the same way as other functions in this file seem to be fixed.
> Ugly tabs formatting is not fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-1426) [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1426?page=all ]

Geir Magnusson Jr reassigned HARMONY-1426:
------------------------------------------

    Assignee: Geir Magnusson Jr

> [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1426
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1426
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>         Assigned To: Geir Magnusson Jr
>         Attachments: jvmti-thread.patch
>
>
> Array of monitors created by function GetOwnedMonitorsInfo can be freed with Deallocate JVMTI function. This array is taken from Thread Manager by calling jthread_get_owned_monitors. But Thread Manager uses APR pools for allocating memory for this array. So when JVMTI agent tries to use Deallocate on the array pointer the program usually crashes since the pointer was not allocated by JVMTI Allocate.
> Inside of JVMTI implementation Allocate simply calls malloc. So to solve this prooblem it is enough to change Thread Manager allocator to malloc. I've done this fix in the same way as other functions in this file seem to be fixed.
> Ugly tabs formatting is not fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1426) [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1426?page=comments#action_12435092 ] 
            
weldon washburn commented on HARMONY-1426:
------------------------------------------

I looked at this patch.  It is simple. The above is a good description.  I'm OK with it being committed.

> [drlvm] Thread manager uses wrong allocator for monitors returned by jthread_get_owned_monitors
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1426
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1426
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>         Attachments: jvmti-thread.patch
>
>
> Array of monitors created by function GetOwnedMonitorsInfo can be freed with Deallocate JVMTI function. This array is taken from Thread Manager by calling jthread_get_owned_monitors. But Thread Manager uses APR pools for allocating memory for this array. So when JVMTI agent tries to use Deallocate on the array pointer the program usually crashes since the pointer was not allocated by JVMTI Allocate.
> Inside of JVMTI implementation Allocate simply calls malloc. So to solve this prooblem it is enough to change Thread Manager allocator to malloc. I've done this fix in the same way as other functions in this file seem to be fixed.
> Ugly tabs formatting is not fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira