Crossgen2: pass the hidden type arg for wasm array Address thunks - #133624
Conversation
Array address methods need a hidden instantiation argument. Fixes dotnet#133307 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 69d6e452-03d7-4aee-aa05-fbe185a200b0
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/crossgen-contrib |
There was a problem hiding this comment.
🔵 Needs a closer look
Although the diff is small, it changes low-level wasm calling/signature behavior in the R2R/JIT interface and should get a final human review for cross-cutting correctness impact.
Pull request overview
This PR fixes a browser-wasm ReadyToRun (Crossgen2) failure caused by a wasm delay-load helper thunk being generated with a signature that omitted the hidden “paramtype” argument required for multidimensional array Address calls, and then re-enables the previously gated smoke test.
Changes:
- Update wasm signature lowering so
IsArrayAddressMethod()also triggers emission of the hidden instantiation/type argument in the wasm-level signature. - Re-enable
TestGenericMDArrayBehaviorin the crossgen2 smoke test runner by removing the wasm R2R gating.
File summaries
| File | Description |
|---|---|
| src/tests/readytorun/crossgen2/Program.cs | Removes the wasm R2R conditional skip so TestGenericMDArrayBehavior runs again in that configuration. |
| src/coreclr/tools/Common/JitInterface/WasmLowering.cs | Includes IsArrayAddressMethod() in lowering-flag computation so generated wasm thunk signatures include the hidden type argument. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
|
@davidwrighton PTAL There may still be an issue with the GCRefMapBuilder, it special cases this method only for X86. |
This comment and logic look wrong. x86 multidimm array method do use IL stubs like any other architecture. And we should have the hidden arg on all architectures, not just on x86. I think we get away with this since all arguments of the method are integers, there is nothing to report to the GC beyond |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 69d6e452-03d7-4aee-aa05-fbe185a200b0
|
@jkotas thanks - applied exactly as suggested in 29f7ce8, and dropped the (incorrect) x86 comment. Validation: rebuilt wasm crossgen2, re-ran the One related thing I noticed but did not touch, in case it's worth a separate look: Note This comment was drafted with AI assistance. |
I am not able to tell whether there is an actual problem. If there is one, it should show up as test failure. |
|
Failures are #133702 |
|
/ba-g known mono test failures |
Array address methods need a hidden instantiation argument.
Fixes #133307
Note
This PR description was generated with the assistance of GitHub Copilot.