Harmony
  1. Harmony
  2. HARMONY-1720

Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None

      Description

      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.

      1. ThreadStopThrowable.java
        1 kB
        Elena Semukhina
      2. ThreadStop1.java
        0.9 kB
        Elena Semukhina
      3. Harmony-1720_Thread.patch
        0.5 kB
        Elena Semukhina
      4. H-1720.patch
        2 kB
        Alexey Varlamov
      5. H-1720_combined.patch
        2 kB
        Elena Semukhina

        Issue Links

          Activity

          Geir Magnusson Jr made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Geir Magnusson Jr made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          Geir Magnusson Jr made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Geir Magnusson Jr made changes -
          Assignee Geir Magnusson Jr [ geir ]
          Elena Semukhina made changes -
          Attachment H-1720_combined.patch [ 12342993 ]
          Attachment ThreadStopThrowable.java [ 12342992 ]
          Elena Semukhina made changes -
          Attachment ThreadStop1.java [ 12342879 ]
          Alexey Varlamov made changes -
          Attachment H-1720.patch [ 12342852 ]
          Geir Magnusson Jr made changes -
          Link This issue is related to HARMONY-1519 [ HARMONY-1519 ]
          Elena Semukhina made changes -
          Field Original Value New Value
          Attachment Harmony-1720_Thread.patch [ 12342326 ]
          Elena Semukhina created issue -

            People

            • Assignee:
              Geir Magnusson Jr
              Reporter:
              Elena Semukhina
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development