RFR: 8371944: AOT configuration is corrupted when app closes System.out
Ioi Lam
iklam at openjdk.org
Wed Nov 19 06:52:23 UTC 2025
On Wed, 19 Nov 2025 05:31:55 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > This would change the behavior of the past 25 years, where System.out.close() has meant "this current process should no longer write to the stdout out". This applies to Java code, JVM, and JNI code.
>
> Perhaps but that seems better than allowing the JVM to write to a file owned by the application just because it happened to close System.out. This could certainly explain some weird file corruption bugs we have seen over the years. And with enough randomness, combined with not normally closing System.out/err that we have not recognized it for the problem that it is.
Maybe. This type of corruption happens only on Windows, so I am not sure if there's enough motivation to make such a change.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28335#issuecomment-3551056851
More information about the hotspot-runtime-dev
mailing list