harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1720) Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Date Tue, 17 Oct 2006 10:51:36 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12442860 ] 
Alexey Varlamov commented on HARMONY-1720:

Elena, thanks for the test!
I slightly modified it and observe different behavior: indeed there is assymetry for stop()
and stop(Throwable), but it does not depend on thread status. That is, there is no any check
for stop() and both checkAccess(this) and checkPermission(RuntimePermission "stopThread")
for stop(Throwable).
Looking at the test_stop_subtest0, I see that exactly this behaviour is expected - I should
have looked there earlier to save our time :)

> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>                 Key: HARMONY-1720
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1720
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Semukhina
>            Priority: Critical
>         Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch,
ThreadStop1.java, ThreadStopThrowable.java
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError:
checkAccess called
> The test does not expect that security manager's checkAccess() method is called when
stopping a new thread which is not running yet.
> I think it is a compatibility issue. 
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this
as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs
now. This issue is expected to be fixed with H-1519.

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


View raw message