Repository navigation
Fix: Proxy type without sun.misc.Unsafe so jlinked app images install the binder - #79
Merged
Merged
Conversation
…age installs proxies (#77) The Compose app image is jlinked without jdk.unsupported; ProxyType's static initialiser loaded sun.misc.Unsafe and failed with ExceptionInInitializerError, so the binder never installed and every Kotlin-namespace import raised 'No module named org'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #77
Defect fixed: Compose's jlinked app runtime has no jdk.unsupported; desktop
ProxyType's static initialiser loadedsun.misc.Unsafe→ ExceptionInInitializerError → the binder never installed → every Kotlin-namespace import raisedNo module named 'org'. The proxy type's structs and slot reads/writes now go through Panama (allocateBytesFreeable, newwritePointerSlot); nothing beyond java.base (SPEC L-10). JDK 16–18 (incubator FFM) loses proxies; the build targets JDK 21. Dealloc cost not yet measured.Test added: JlinkedRuntimeProxyTypeTest (child JVM with --limit-modules java.base, and a full-JDK control).
Verification (coordinator, after merging develop, each module separately): plugin 235/0, desktopTest 580/0, ksp artifact 35/0, app 70/0, compose 111/0; androidNative + iosSimulatorArm64 compile OK; :sample:createDistributable OK. Packaged .app launched from / with PYTHONHOME unset: before →
proxies : ExceptionInInitializerError: null+No module named 'org'x4; after →proxies : installed: 1080 lines of generated Python, 4 proxy classes, Greeter/companion/await lines all succeed.