-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b156
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174445 | 10 | Harold Seigel | P2 | Resolved | Fixed | b01 |
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.
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.
- backported by
-
JDK-8174445 Fix timing bug in JVM management of package export lists
-
- Resolved
-
- relates to
-
JDK-8170870 Fix synchronization of access to PackageEntryTables and ModuleEntryTables
-
- Closed
-