RFR: 8317951: Refactor loading of zip library to help resolve JDK-8315220

David Holmes dholmes at openjdk.org
Wed Oct 18 02:40:48 UTC 2023


On Wed, 11 Oct 2023 12:57:09 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> Greetings,
> 
> This refactorization resolves the problem associated with [JDK-8315220](https://bugs.openjdk.org/browse/JDK-8315220) and, subsequently, [JDK-8315892](https://bugs.openjdk.org/browse/JDK-8315892).
> 
> Testing: jdk_jfr, tier1-9, stress testing
> 
> Thanks
> Markus

Seems okay in principle but I'm unclear about the initialization logic.

Thanks.

src/hotspot/share/utilities/zipLibrary.cpp line 109:

> 107:  public:
> 108:    ZipLibraryLoaderLock() : _jt(nullptr) {
> 109:     Thread* thread = Thread::current_or_null_safe();

Why do you need the "safe" version here? can this be called from a signal handling context?

src/hotspot/share/utilities/zipLibrary.cpp line 146:

> 144: 
> 145: void ZipLibrary::close(jzfile* zip) {
> 146:   initialize();

This seems a bit odd, surely if we are closing something we had to open it first, so we should be asserting that initialization has already happened. ??

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

PR Review: https://git.openjdk.org/jdk/pull/16149#pullrequestreview-1683804288
PR Review Comment: https://git.openjdk.org/jdk/pull/16149#discussion_r1363034471
PR Review Comment: https://git.openjdk.org/jdk/pull/16149#discussion_r1363039188


More information about the hotspot-runtime-dev mailing list