Skip to content

[wasm][R2R] GC/API/GC/GetGeneration: objects stay in generation 0 after GC.Collect #134803

Description

@lewing

Description

On browser-wasm CoreCLR with ReadyToRun (RunCrossGen2=1), GC/API/GC/GetGeneration fails. After GC.Collect() the tested objects are still reported as generation 0, so ObjectTest and arrayTest fail:

Running test: GC/API/GC/GetGeneration/GetGeneration.dll
0 0
ObjectTest Failed!
0 0
arrayTest Failed!
failTest Passed!
Test for GetGeneration() FAILED!
Expected: 100
Actual:   1

That matches the reason the test already skips under the interpreter ("Interpreter reports locals as pinned, causing generation demotion that this test does not expect"). The test used to be skipped on every wasm run, because the runtime-test InterpreterActive mode was always true on wasm. #134767 changes InterpreterActive to mean "code runs in the interpreter" (no JIT and not ReadyToRun-compiled), so wasm R2R now runs it.

Configuration

  • Fails: browser-wasm CoreCLR Checked, ReadyToRun (TEST_READY_TO_RUN_MODE=1).
  • Skipped (interpreter): browser-wasm CoreCLR without R2R.
  • Passes: maccatalyst-arm64 CoreCLR Release ReadyToRun (no JIT), android-arm64 CoreCLR, and desktop CoreCLR.

The root cause isn't known. Candidates are part of the call path still running in the interpreter under wasm R2R, or conservative or pinned stack reporting for wasm R2R frames.

Note

This issue was drafted with GitHub Copilot.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions