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

Matthias Baesken mbaesken at openjdk.org
Thu Aug 28 07:25:42 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

Hi David, with your PR added, I do not see the issue any more in our asan - tests  (jtreg and some others) .

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

PR Comment: https://git.openjdk.org/jdk/pull/26832#issuecomment-3232262168


More information about the hotspot-dev mailing list