Integrated: 8364735: [asan] heap-use-after-free error detected in defaultStream::writer during VM shutdown

David Holmes dholmes at openjdk.org
Fri Sep 5 00:30:22 UTC 2025


On Tue, 19 Aug 2025 00:11:38 GMT, David Holmes <dholmes at openjdk.org> wrote:

> `ostream_exit` was deleting the stream underlying the `xtty` prior to nulling the `xtty` global variable, resulting in a use-after-free-error. Due to races during VM shutdown we cannot make use of `xtty` perfectly safe, but we can certainly narrow the window during which use-after-free is possible.
> 
> Testing:
>  - tiers 1-3 sanity
> 
> Thanks

This pull request has now been integrated.

Changeset: 40a60252
Author:    David Holmes <dholmes at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/40a602520ba1a4682213b74e6f2a6f5a6e35d839
Stats:     6 lines in 1 file changed: 4 ins; 0 del; 2 mod

8364735: [asan] heap-use-after-free error detected in defaultStream::writer during VM shutdown

Reviewed-by: jsjolen, stuefe

-------------

PR: https://git.openjdk.org/jdk/pull/26832


More information about the hotspot-dev mailing list