8156871: Possible concurrency issue with JVM_AddModuleExports

Need for single PackageEntry flag to determine a package's unqualifed export state.

Reviewed-by: acorn, ctornqvi, dholmes, jiangli
This commit is contained in:
Lois Foltan 2016-06-16 13:34:32 -04:00
parent eba25b33b9
commit f3741800fe
10 changed files with 359 additions and 16 deletions

View file

@ -568,8 +568,8 @@ void Modules::add_module_exports(jobject from_module, jstring package, jobject t
to_module_entry->is_named() ?
to_module_entry->name()->as_C_string() : UNNAMED_MODULE);
// Do nothing if modules are the same or if package is already exported unqualifiedly.
if (from_module_entry != to_module_entry && !package_entry->is_unqual_exported()) {
// Do nothing if modules are the same.
if (from_module_entry != to_module_entry) {
package_entry->set_exported(to_module_entry);
}
}