[14] 8236661: Launcher test PatchSystemModules.java fails frequently after JDK-8234049
Mandy Chung
mandy.chung at oracle.com
Tue Jan 14 06:02:38 UTC 2020
This looks okay. No one can access ExtendedMapNode until the module
system is fully initialized.
Mandy
On 1/13/20 4:18 PM, Brian Burkhalter wrote:
> https://bugs.openjdk.java.net/browse/JDK-8236661
>
> Don’t init ExtendedMapMode until modules have been initialized.
>
> --- a/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java
> +++ b/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java
> @@ -49,6 +49,7 @@
> import jdk.internal.access.SharedSecrets;
> import jdk.internal.misc.ExtendedMapMode;
> import jdk.internal.misc.Unsafe;
> +import jdk.internal.misc.VM;
> import jdk.internal.ref.Cleaner;
> import jdk.internal.ref.CleanerFactory;
>
>
> @@ -1116,8 +1117,11 @@
> }
>
>
> private boolean isSync(MapMode mode) {
> - return mode == ExtendedMapMode.READ_ONLY_SYNC ||
> - mode == ExtendedMapMode.READ_WRITE_SYNC;
> + // Do not want to initialize ExtendedMapMode until
> + // after the module system has been initialized
> + return !VM.isModuleSystemInited() ? false :
> + (mode == ExtendedMapMode.READ_ONLY_SYNC ||
> + mode == ExtendedMapMode.READ_WRITE_SYNC);
> }
>
> Thanks,
>
> Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200113/298e11d5/attachment.htm>
More information about the nio-dev
mailing list