Integrated: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Sep 11 11:21:15 UTC 2024


On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> The new test added by https://github.com/openjdk/jdk/pull/20854 fails spuriously.
> While JNI lookup is now moved into the static initializer of the `MappedMemoryUtils` class, this class might only get initialized while in the middle of a scoped context.
> 
> To address this, I created a new proxy interface, namely `MappedMemoryUtilsProxy`. This interface is used by `ScopedMemoryAccess` to call the various `force`/`load`/`isLoaded`/`unload` methods, and a singleton instance is provided inside `MappedMemoryUtils` itself, and then exposed via the `SharedSecrets` mechanism.
> 
> Crucially, `MappedMemorySegmentImpl` will now _first_ obtain a `MappedMemoryUtilsProxy` and _then_ call `ScopedMemoryAccess`. This should move all class initializer side-effects out of the scoped method context.

This pull request has now been integrated.

Changeset: 59778885
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/597788850042e7272a23714c05ba546ee6080856
Stats:     130 lines in 7 files changed: 73 ins; 31 del; 26 mod

8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames
8339780: TestByteBuffer fails on AIX after 8339285

Reviewed-by: alanb, jvernee

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

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


More information about the core-libs-dev mailing list