Skip to content

Upstream wave 21 (25.5.5-elide.33) - #255

Open
Sam Gammon (sgammon) wants to merge 75 commits into
elide-25.5.xfrom
upstream/wave-21
Open

Sam Gammon (sgammon) wants to merge 75 commits into
elide-25.5.xfrom
upstream/wave-21

Conversation

@sgammon

@sgammon Sam Gammon (sgammon) commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Upstream wave 21 for 25.5.5-elide.33: 73 commits from 40 upstream PRs, cherry-picked from oracle/graal master with -x, plus two fork adaptation commits. Merge with rebase so the trailers stay. Merge #256 (a separate fix for a .32 build failure that this wave's local build exposed) with or before it.

Range: wave 20 (#249) picked through 9adfd47b062 (GR-81413) and evaluated through 13706aa8111 (2026-11-18). This wave takes upstream PRs merged after that, through 0fe272788a0 (GR-81409, 2026-11-23), and re-evaluates what wave 20 left in 958e1030f6e..13706aa8111 and the older held items. Picked PR by PR (wave21.sh, log wave21-log.tsv): a PR is held whole if it touches svm.guest.staging or org.graalvm.collections, or doesn't apply.

Picked by hand (mechanical resolutions)

  • GR-81385 3fd1dcaa851 Normalize preserved indirect call targets (1): conflict in BuildTimeConstantPool.java; kept the fork's extra LinkageError catch around the method lookup and took upstream's indirectInvokeTarget(...).
  • GR-81675 13706aa8111 Preserve management bean identity across image layers (2): import-only conflicts. AbstractMemoryMXBean gets the VMManagementBean import (upstream's guest.staging.option.RuntimeOptionValues.Origin import is not used on 25.5); ManagementFeature keeps the RuntimeClassInitialization import, which 25.5 still uses.
  • GR-74955 32823ea977c Make SVM NFI native closures more robust to stack overflow (6): conflict at the end of the NFI test numeric.c; kept the fork's sum_16_SINT64 / sum_17_SINT64 test functions next to upstream's new call_closure_noarg_*.
  • GR-81036 710e872c96f Prevent hangs after first-isolate initialization failure (1): touches svm.guest.staging (RuntimeSupport), but only a file 25.5 already has in staging; applied cleanly.

Fork adaptations

  • svm: use 25.5's StackOverflowCheck in the NFI native closure: GR-74955 imports StackOverflowCheck from com.oracle.svm.guest.staging.core.stack, where upstream moved it on Nov 5; on 25.5 the same interface (same methods) is in com.oracle.svm.core.stack.
  • svm: register Shenandoah MX beans in the initial layer only: GR-81675 makes GCRelatedMXBeans an initial-layer-only singleton (SingleLayer / InitialLayerOnly) and changes the G1 and Serial registrations to match; the fork-only ShenandoahRelatedMXBeans / ShenandoahFeature get the same change.

Picked (in upstream order)

  • e32fca00592 [GR-80594] Promote Run-Time Class Loading in Native Image Documentation (1)
  • a927f2c44fc [GR-81137] Check AMD64 address displacement arithmetic (2)
  • de4058318b0 [GR-81423] Fix equality folding for virtual arrays with wide stores (1)
  • 0974577c7e5 [GR-81778] Avoid spurious boxing-overload warnings for transitive replacements. (1)
  • 36e90899926 [GR-79381] Complete discarded compilation tasks. (2)
  • 0d97f235230 [GR-81488] Clean memory in conservative runtime-state trim mode (2)
  • c1b06aa797a [GR-81175] Add SubstrateMethodRefStamp equals and hashCode that distinguish pointers and offsets. (1)
  • b7b30e01edf [GR-78602] Preserve stride overflow when calculating IV direction (1)
  • b5d67b167c7 [GR-79662] Set up DaCapo and Scala DaCapo benchmarking for Crema (2)
  • b8df33682ce [GR-80893] [GR-81392] [GR-81486] Delegate record component lookup to JVMCI (1 of 2)
  • bd884eb3eff [GR-81726] Cast inode to long when custom fs provides it as int. (1)
  • 8d9305f3a81 [GR-81140] [GR-81166] Preserve array and raw memory alias dependencies (6)
  • 3c458e0dd4f [GR-81818] Reject primitive tracking and predicates under context-sensitive analysis (2)
  • 6e134b96f64 [GR-81081] Guard derived loop updates during strip mining. (2)
  • 91fdfb65f8e [GR-81582] Remove implicit guest safepoints at method calls. (1)
  • cc5e7b28fd9 [GR-81083] Keep loop counter stamp inference consistent with the root IV (1)
  • a63811059f3 [GR-81379] [GR-81380] Fix issues from the combination of TrackPrimitiveValues and UsePredicates. (2)
  • a119c44f42b [GR-81888] Fix future-defaults compatibility in native-image benchmarks (2)
  • a12dfe8f664 [GR-81088] Skip deleted stride markers after partial unrolling. (2)
  • 97123183043 [GR-81784] Handle adversarial layout in DataSection tests (2)
  • 2d358ca38d9 [GR-81808] Upgrade to rust 1.100. (1)
  • 787d97f412c [GR-81975] Match predicate rejection expectation to implied tracking (1)
  • 54a5ad242b6 [GR-81315] Report missing URL handler constructor metadata (1)
  • 67fd788e9a4 [GR-81398] Refactor Native Image analysis graph processing (3)
  • 7f6a661f1ad [GR-75931] Stabilize MethodHandle LambdaForm invoker names (3)
  • 7c8ad850855 [GR-81992] Persist explicit object-layout metadata in layer snapshots. (1)
  • 4398705a86a [GR-81866] Corrections of FastDoubleParser. (2)
  • 4d2b6d52520 [GR-81994] Use loop ancestry for CFG block membership checks. (1)
  • 7b17ecc8a65 [GR-74128] Update GHA/bundler/CI dependencies. (7)
  • 0e2ec13d881 [GR-81098] Preserve exact access widths for short constant array copies (1)
  • 4718923d469 [GR-81075] Preserve exact-add overflow checks in unsigned loops (1)
  • ca07de1f488 [GR-81410] Preserve array clone runtime type (1)
  • 12732a45201 [GR-81142] Clamp unsigned stamp bounds before sign extension (2)
  • b7aa8af199b [GR-81089] Preserve floating header guards during loop inversion (1)
  • c03bdd86b09 [GR-81119] Preserve unsigned order when stripping zero extensions (1)
  • 0fe272788a0 [GR-81409] Preserve source checks for zero-length arraycopies (1)

Partly taken

  • GR-80893 / GR-81392 / GR-81486 b8df33682ce: took 3e336698610 (Espresso refreshes unresolved record component types); left out 16db8409c69 (AnalysisMetaAccess.lookupJavaRecordComponent delegates to JVMCI), whose own comment says the workaround it removes is needed until the JVMCI fix (GR-80228) is in every supported builder JDK. jvmci-25.5-b24 and Oracle EA ea.05 predate that.

Held

Left over from wave 20's window (958e1030f6e..13706aa8111):

  • 9fb1a6eaad1 [GR-81727] Replace Crema with Interpreter in JNI upcall naming: a rename across 10 files that conflicts with the fork's Crema/interpreter changes; no behaviour change.
  • 516d98e1977 [GR-80839] Bump Barista harness to 0.8.2: Oracle benchmark harness, not used by the fork's CI.
  • 40d47123af0 [GR-79412] Restore interpreter-triggered splitting (breaking Truffle change): conflicts with the fork's typed calls in OptimizedCallTarget, OptimizedDirectCallNode, TruffleSplittingStrategy; needs a real port and a Komodo/Bali check.
  • 75aa770a3ab [GR-81383] Add temporal @ShouldBe annotation: annotates classes that upstream moved into svm.guest.staging on Nov 5 and 25.5 doesn't have there.
  • f452039e442 [GR-81496] Policy-aware hosted inlining variants (re-evaluated): hooks with no CE user, plus CompileQueue / SubstratePriorityInliningPhase changes that Oracle's EE jars link against; nothing on 25.5 needs it. Still held.

New in this window:

  • 57247a1aadf [GR-55132] Periodic update of the language imports: suite import bumps.
  • 4772cce7412 [GR-81446] Check -Xss early: built on GuestStagingDependencyBridge methods for classes 25.5 has outside staging; conflicts. Better error message only; port later if wanted.
  • 6347b3a4c54 [GR-81506] Support-class boundaries after DynamicHub migration preparation: Terminus/staging migration prep (mostly docs and comments); conflicts in terminus-migration.md.
  • fb798608647 [GR-81690] Decode field annotations using their metadata layer: layered images only; needs staging LayerIdComputer, which 25.5 lacks.
  • b64a7e84a44 [GR-79503] Allocation-free functional interface proxies: 20 files conflict with the fork's typed calls (TypedEntrySupport, SubstrateTruffleRuntime, RootNode, Accessor); needs a real port.
  • 3c5d5099ae0 [GR-81626] Expose Bytecode DSL operation classes: already on elide-25.5.x (truffle: backport InstructionDescriptor.getOperationClass() (GR-81626) #241, 67e12a237ab).

Older held items, re-evaluated (all still conflict):

  • 13b1f0a4216 [GR-80536] Pin survivor-space objects during young GC: 15 conflict hunks in 7 Serial GC files (GCImpl, ObjectPromoter, CompactingOldGeneration, ...) against the fork's GC changes; behind an expert option that's off by default.
  • 47d64e185cb [GR-72833] Interpreter calls with explicit bytecode indices and typed roots: the first of 5 commits conflicts with the fork's typed calls (SubstrateTruffleRuntime, RootNode, Accessor, OptimizedRuntimeSupport).
  • dc4712f8cf4 [GR-79384] Remove PLT/GOT initializer relocations: 5 hunks in PLTGOTFeature / PLTSupport; depends on upstream refactors 25.5 lacks.
  • GR-80207 (EconomicMap) stays out: it changes org.graalvm.collections (see Upstream wave 20: allocation counters, arraycopy interface stamps, TRegex flat DFA, preallocated exceptions, Wasm ref.as_non_null #249).

Checked locally (LabsJDK jvmci-25.5-b24, mx 7.87.0)

On the PR head plus #256 (local wave21/validate), and for the release-shaped checks on that tree plus the 42-commit CI stack replayed from .32 (local wave21/rc).

  • Strict build (mx build --build-logs=silent --warning-as-error --force-javac, from web-image with /wasm,/regex): pass (GATEBUILD-OK). Two adaptations were needed (the StackOverflowCheck import; the unused import left by the GR-81675 resolution, folded into that pick). Without compiler: require BMI2 for the AVX-512 Base64 decode stub variant #256, this build fails on libwasmvm (instruction BZHI not supported in SVMIntrinsicStubsGen.base64DecodeBlockRTC0). That bug came from svm: run-time checked AVX-512 paths for Base64, ChaCha20, CRC32, CRC32C and AES-GCM stubs #251 and is already in .32, not from this wave: the same build fails the same way on elide-25.5.x 6f634fcf15a. Details in compiler: require BMI2 for the AVX-512 Base64 decode stub variant #256.
  • mx checkstyle --primary: compiler, sdk, truffle, substratevm, wasm, regex pass. web-image reports only the error already on elide-25.5.x (WebImageWasmLMThreadLocalCollector should be declared as final).
  • JVM unit tests: the 21 compiler test classes the wave adds or changes (address lowering, counted loops, strip mining, loop inversion, partial unroll, alias/read elimination, stamps, ZeroLengthArrayCopyTest, ArrayCloneRuntimeClassTest, VirtualByteArrayEqualsTest, QueueCancellationTest, TruffleSafepointInsertionPhaseTest, TStringOpsCopyConstantLengthTest, DataSectionTest, ...) OK (272 tests); jdk.graal.compiler.loop.test OK (205 tests); jdk.graal.compiler.replacements.test OK (1726 tests); Truffle TStringParseDoubleTest, TruffleFileTest, BoxingEliminationTest, RewriteUnexpectedResultTest OK (103 tests); com.oracle.truffle.nfi.test (GR-74955, including the new ExceptionNFITest cases and the fork's 16/17-argument tests) OK (596 tests); mx standalone-pointsto-unittest host OK (38 tests).
  • SVM native unit tests: MethodHandleStableNameTest, MethodHandlesLoopObservationTest, URLProtocolFailureTypeTest (one image each), com.oracle.svm.test.jmx (GR-81675) OK (17 tests): all pass. mx helloworld --build-only with -H:+TrackPrimitiveValues -H:-UsePredicates (GR-81380's new gate step): pass.
  • Release dist build (ci/elide/build-dist.sh, the workflow's Unix component set including svmgc from labs-openjdk 2aa99d3a422): pass. The workflow's smoke steps on that home: java --version, libgraal on, libgraal -Xcomp, agent, native-image hello, Shenandoah generational and with run-time class loading (these exercise the Shenandoah MX-bean adaptation), the Shenandoah metaspace probe, both blocked-certs checks, a Crema run of runtime-loaded code and a Ristretto run: pass. CVE-2026-114938 B64Tail at -march=native: NOT REPRODUCED.
  • EE assembly (ci/elide/build-ee.py on Oracle EA jdk-25i5-25.0.4.1.1-ea.05): link check: 1424 enterprise classes (8 jars, modules [com.oracle.graal.graal_enterprise, com.oracle.svm.enterprise.truffle]), 15128 references into 20236 fork classes; upgraded modules [jdk.graal.compiler], no problems; launcher rebuilt; smoke-ee.sh: EE smoke tests passed.

Not checked: Komodo/Bali against the new jars (GR-81582 removes the implicit guest safepoint polls before calls in compiled Truffle code, which is a behaviour change for guest languages); the Espresso variant of the standalone points-to tests (needs espresso-compiler-stub); SVM NFI tests in a native image; layered images (GR-81675, GR-81992); Windows and macOS.

CI on f1c20b4e856: Elide Gate (substratevm native unittests, substratevm truffle unittests, regex unittests, truffle unittests) and Shenandoah Truffle (runtime-compilation) all pass.

Upstream's weekly reachability-metadata workflows start on this PR because GR-74128 edits their workflow files. They build GraalVM on GitHub-hosted runners and test upstream's settings, so I cancelled those runs. They show as failed checks; they aren't gates.

🤖 Generated with Claude Code

Olga Gupalo (olyagpl) and others added 30 commits November 23, 2026 17:03
Complete discarded wrappers and remove them from the owning executor's tracked tasks while pruning the traversing queue.

(cherry picked from commit 895e669)
Derive induction-variable direction from the effective stride in its native
integer width, preserving overflow through negation, scaling and narrowing.

Cover overflowing strides and align the negated-stride tests with rejection
of loops whose effective direction is unknown or disagrees with the limit.

(cherry picked from commit 7fcbb80)
Retry a non-loading lookup when a record component still holds an unresolved type, and cache the corresponding resolved type once its class has been loaded elsewhere.

This mirrors HotSpot JVMCI behavior so the standard record-component lookup can observe the transition without forcing class loading.

(cherry picked from commit 3e33669)
…ysis

Context-sensitive analysis does not support TrackPrimitiveValues or
UsePredicates yet. The AnalysisContextSensitivity callback turns both off,
but options given after the policy, or AllocationSiteSensitiveHeap set
directly, keep them on. The analysis then silently drops most reachable
code, or the build fails after analysis.

Check the final option values when PointsToAnalysis is created and reject
a context-sensitive policy with either option enabled, naming the policy,
the options and the remedy. Defaults and option order are unchanged.

(cherry picked from commit bd0bd16)
…ivity

Read TrackPrimitiveValues and UsePredicates once in the PointsToAnalysis
constructor, pass them to the check, and assign the same values to the
fields.

The rejection now tells calling-context-sensitive analysis (a positive
MaxCallingContextDepth, as with _1obj to _4obj3h) apart from
context-insensitive analysis with an allocation-site-sensitive heap
(allocsens, or AllocationSiteSensitiveHeap alone), and words the remedy
for that mode. The tests assert the mode, the selector and the remedy.

(cherry picked from commit 78ed1d6)
Retain existing root stamps when an unsigned checked counter reverses direction. Compute bounds using the stride and direction of the induction variable whose initial value and extremum are supplied.

(cherry picked from commit 09b6e33)
Disabling primitive tracking also disables predicates. Enabling predicates enables primitive tracking, so the last explicitly set option takes precedence. Cover the option ordering and standalone image builds.

(cherry picked from commit 0824e09)
JavaKind.Void is classified as primitive, but void return flow reachability is populated only when predicates are enabled. Excluding Void prevents a false unreachable return from removing C function epilogues. Cover the flag combination with a HelloWorld image build in the SVM gate.

(cherry picked from commit 2ee447d)
(cherry picked from commit 395ac9f)
(cherry picked from commit 48e9c86)
(cherry picked from commit d753f7e)
Fixes CI failures due to wrong Java version for Quarkus jobs

(cherry picked from commit fcedee8)
(cherry picked from commit 904bfaa)
Introduce VMManagementBean and mark Native Image management beans and
suppliers. Require the marker when adding beans to the VM registry.

(cherry picked from commit 300a43a)
Sacha Coppey (Zeavee) and others added 10 commits November 23, 2026 17:30
Persist bean replacements through the cross-layer constant registry and
defer constant reconstruction until substitution setup is complete.
Install GC management registries in the initial layer and resolve their
folded lookups there. Reuse VM-owned beans across layers while allowing
application beans and rejecting unreplaced hosted VM beans.

(cherry picked from commit 8dda770)
Upstream GR-81675 made GCRelatedMXBeans an initial-layer-only singleton and
changed the G1 and Serial GC registrations to match. Do the same for the
fork's Shenandoah registration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit cde1a7a)
Try to catch and set pending exceptions in more cases.
Use the yellow-zone when trying to set the pending exception.

(cherry picked from commit 8ca46dd)
Add more stack overflow tests

(cherry picked from commit f78c3b3)
The first isolate claims process initialization before runtime argument parsing.
An early error return or a caught exception can leave that claim IN_PROGRESS,
causing subsequent graal_create_isolate calls to spin after the initializing
caller has returned an error. An empty LogFile argument exposes this path.

Publish FAILED before tearing down a first isolate whose process initialization
is unfinished. Use a compare-and-set from IN_PROGRESS so failures in later
initialization hooks cannot overwrite SUCCESSFUL. Preserve the native-library
success publication point, and let waiting creators stop on either terminal
state. Later creation attempts return ISOLATE_INITIALIZATION_FAILED rather than
retry process initialization. Assign each isolate ID exactly once and retain
the actual first-isolate identity passed to lifecycle hooks.

Allow failed-startup teardown to clear untouched, zero-initialized cache entries
for isolate ID zero without weakening the assertions for other isolates. Skip
the reference-handler detach wait when initialization failed before that thread
started; passing its null thread pointer to the wait otherwise aborts cleanup
with runtime assertions enabled.

Clarify that initialization hooks follow arguments supplied at isolate creation,
while options delivered later by an embedder such as libgraal require startup
hooks. The companion enterprise regression checks the initial parsing error,
repeated failure returns for valid creation requests, and teardown notifications
after all other isolate threads have exited.

(cherry picked from commit d110451)
GR-74955 imports StackOverflowCheck from com.oracle.svm.guest.staging.core.stack,
where upstream moved it on Nov 5. On 25.5 the same interface is still in
com.oracle.svm.core.stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sgammon
Sam Gammon (sgammon) marked this pull request as ready for review November 24, 2026 03:15

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 6 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.