<AWT Dev> [8] Review request for 8002191 AWT-Shutdown thread does not start with the AppletSecurity on Linux
Alexander Scherbatiy
alexandr.scherbatiy at oracle.com
Tue Nov 13 07:32:37 PST 2012
On 11/13/2012 4:47 PM, Anthony Petrov wrote:
> Hi Alexander,
>
> I'm wondering why does the bug synopsis mention a concrete platform
> (Linux), but the fix is in shared code? Why wasn't this a problem for
> e.g. Windows or Mac previously? And will anything be affected by this
> change on these other platforms?
The AWT-Shutdown thread starts from WToolkit constructor (see the
fix for the issue 4701990). And the toolkit is created with the
necessary permissions in the Toolkit.getDefaultToolkit() method.
The AWT-Shutdown thread started from the native awt.m library on
MacOSX which is load with the necessary permissions.
The AWT-Shutdown thread starts on Linux from the main thread when
the system needed it and so it does not have necessary permissions.
The AWTAutoShutdown.notifyToolkitThreadBusy() method is public so
it can be invoked from any place on any OS and leads to the security
exception if a SecurityManager is set.
The current fix does not affect Windows and MacOSX platforms.
Thanks,
Alexandr.
>
> --
> best regards,
> Anthony
>
> On 11/13/2012 1:12 PM, Alexander Scherbatiy wrote:
>> On 11/12/2012 9:52 PM, Sergey Bylokhov wrote:
>>> Hi, Alexander.
>>
>> Could you review the updated fix:
>> http://cr.openjdk.java.net/~alexsch/8002191/webrev.01/
>>
>>> Does setDaemon also requires additional permissions?
>> Yes. It requires the modifyThread permission.
>>> Also note, all this file has 80 lines alignment.
>> The long line is formatted.
>>
>> Thanks,
>> Alexandr.
>>>
>>> 12.11.2012 18:32, Alexander Scherbatiy wrote:
>>>>
>>>> bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8002191
>>>> webrev: http://cr.openjdk.java.net/~alexsch/8002191/webrev.00
>>>>
>>>> The AWT-Shutdown thread starts from the main thread on Linux and so
>>>> it does not have modifyThreadGroup permissions.
>>>> The fix runs the AWT-Shutdown thread from the doPrivileged block.
>>>>
>>>> The 'thread.setDaemon(false);' line is not formatted because hg
>>>> diff (and so webrev) does not treat new spaces as a change.
>>>>
>>>> Thanks,
>>>> Alexandr.
>>>>
>>>
>>>
>>
More information about the awt-dev
mailing list