RFR: 8373924: Dangling pointer in ImageDecompressor::image_decompressor_close of imageDecompressor.cpp
Alan Bateman
alanb at openjdk.org
Fri Jan 23 16:51:02 UTC 2026
On Thu, 22 Jan 2026 18:57:30 GMT, Henry Jen <henryjen at openjdk.org> wrote:
> I don't see image_decompressor_close actually referenced in the code base, as the decompressors are static and setup from image_decompressor_init().
>
> This PR implements proper cleanup for decompressors to be defensive.
src/java.base/share/native/libjimage/imageDecompressor.cpp line 96:
> 94: _decompressors = NULL;
> 95: _decompressors_num = 0;
> 96: }
What would you think about removing it? Its dead code and not tested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29371#discussion_r2722035594
More information about the core-libs-dev
mailing list