Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-1895

[classlib] [luni/tests] endless recursion in ClassTest.test_getClasses_subtest0

    Details

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

      Description

      The test_getClasses_subtest0 in modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java leads to endless recursion on DRLVM, because of the following:
      The test tries to detect presence of privileged frames on stack during various calls to SecurityManager, via calling AccessController.checkPermission(). If the latter happens to invoke any code guarded by security checks in a privileged block, it will loop endlessly (actually until stack space exhausted, but this may take very long).
      We have exactly this sutiation in DRLVM, due to lazy loading of security policy and AccessController impl nuances.

        Issue Links

          Activity

          Hide
          varlax Alexey Varlamov added a comment -

          Fixed

          Show
          varlax Alexey Varlamov added a comment - Fixed
          Hide
          nbeyer Nathan Beyer added a comment -

          Patch applied, please verify. Thanks.

          Show
          nbeyer Nathan Beyer added a comment - Patch applied, please verify. Thanks.
          Hide
          varlax Alexey Varlamov added a comment -

          Verified.

          Show
          varlax Alexey Varlamov added a comment - Verified.
          Hide
          varlax Alexey Varlamov added a comment -

          Closing

          Show
          varlax Alexey Varlamov added a comment - Closing

            People

            • Assignee:
              nbeyer Nathan Beyer
              Reporter:
              varlax Alexey Varlamov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development