You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2006/11/24 11:29:01 UTC
[jira] Created: (HARMONY-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
[luni] flawed SecurityManager.checkPackageAccess() impl
-------------------------------------------------------
Key: HARMONY-2301
URL: http://issues.apache.org/jira/browse/HARMONY-2301
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey Varlamov
There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
1) Dead-end caching of "package.access" property on the first use;
2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
3) Incomplete name matching procedure, only works for subpackges.
--
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-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=all ]
Alexey Varlamov closed HARMONY-2301.
------------------------------------
Resolution: Fixed
Fixed at r486052.
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Assigned To: Alexey Varlamov
> Attachments: fix2301.diff, test2301.diff
>
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=comments#action_12452439 ]
Alexey Varlamov commented on HARMONY-2301:
------------------------------------------
Ways to fix 1+2:
1) do not cache;
2) add some notification mechanism to j.l.Security, which should track if particular property value is changed and let SecurityManager instance know.
My preference is for 1) until actual measurements can prove caching is useful here.
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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] Reopened: (HARMONY-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=all ]
Stepan Mishura reopened HARMONY-2301:
-------------------------------------
Alexey,
I've rolled back your commit. CC failed after it. Also classlib tests failed for me on IBM VME and DRL VM.
Thanks,
Stepan
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Assigned To: Alexey Varlamov
> Attachments: fix2301.diff, test2301.diff
>
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=all ]
Alexey Varlamov updated HARMONY-2301:
-------------------------------------
Patch Info: [Patch Available]
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Attachments: fix2301.diff, test2301.diff
>
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=all ]
Alexey Varlamov reassigned HARMONY-2301:
----------------------------------------
Assignee: Alexey Varlamov
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Assigned To: Alexey Varlamov
> Attachments: fix2301.diff, test2301.diff
>
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=all ]
Alexey Varlamov closed HARMONY-2301.
------------------------------------
Resolution: Fixed
I believe this is finally fixed.
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Assigned To: Alexey Varlamov
> Attachments: fix2301.diff, test2301.diff
>
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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-2301) [luni] flawed
SecurityManager.checkPackageAccess() impl
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2301?page=all ]
Alexey Varlamov updated HARMONY-2301:
-------------------------------------
Attachment: fix2301.diff
test2301.diff
Test to reproduce 3) and fix for all.
> [luni] flawed SecurityManager.checkPackageAccess() impl
> -------------------------------------------------------
>
> Key: HARMONY-2301
> URL: http://issues.apache.org/jira/browse/HARMONY-2301
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Attachments: fix2301.diff, test2301.diff
>
>
> There are several problems in the current implementation of j.l.SecurityManager.checkPackageAccess() method:
> 1) Dead-end caching of "package.access" property on the first use;
> 2) Thread-unsafe parsing to array of names: concurrent threads may fail with NPE accessing partially-filled array.
> 3) Incomplete name matching procedure, only works for subpackges.
--
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