Fix timing bug in JVM management of package export lists

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • b156

        There are two timing issues in the JVM package export handling on non-TSO systems.

        I believe we have issues with:
        1) boolean is_exported_unqualified relative to is_exported_all_Unnamed
        and
        2) boolean is_exported_unqualified relative to _qualified_exports

        Reflection::verify_class_access is an example of a lock-free reader which calls:
            is_unqual_exported:
               assert(!(_qualified_exports != NULL && _is_exported_unqualified)
            assert(!(_is_exported_allUnnamed && _is_exported_unqualified)

        But another thread could at the same time under a lock run:
            set_unqual_exported()
               _ is_exported_unqualified = true
               _ is_exported_allUnnamed = false
               _ qualified_exports = NULL

        With an out-of-order write, you can provoke either of the asserts in is_unqual_exported.

              Assignee:
              Harold Seigel (Inactive)
              Reporter:
              Harold Seigel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: