RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Sep 9 15:33:44 UTC 2024
> 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.
Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
Drop spurious change
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20914/files
- new: https://git.openjdk.org/jdk/pull/20914/files/32389c43..4053014e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20914&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20914&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/20914.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20914/head:pull/20914
PR: https://git.openjdk.org/jdk/pull/20914
More information about the core-libs-dev
mailing list