Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8171971

Fix timing bug in JVM management of package export lists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • 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.

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

                Created:
                Updated:
                Resolved: