You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On browser-wasm (CoreCLR) with PublishReadyToRun, a 32-byte struct (four 8-byte fields) passed by value to a method is corrupted: the callee reads it shifted up by one 8-byte word, so each field takes the value of the next and the following argument bleeds in. 16- and 24-byte structs pass correctly.
E32 must be ReadyToRun-compiled. Interpreted execution is correct.
Expected
1|31,32,33,34|2
Actual
1|32,33,34,2|0
s.A reads the input B, s.B reads C, s.C reads D, s.D reads the trailing int y (2), and y reads garbage (0) — i.e. the struct argument is read one 8-byte word too high.
Notes
16-byte ({ long, long }) and 24-byte ({ long, long, long }) structs pass correctly; only the 32-byte (four-word) struct is affected.
Reproduces with a direct call; reflection-invoking the same method corrupts it further.
Configuration
-os browser -a wasm, CoreCLR, PublishReadyToRun (crossgen2, --obj-format:wasm)
Reproduces in Node and in the browser.
Note
This issue was written with the assistance of GitHub Copilot.
Description
On
browser-wasm(CoreCLR) withPublishReadyToRun, a 32-byte struct (four 8-byte fields) passed by value to a method is corrupted: the callee reads it shifted up by one 8-byte word, so each field takes the value of the next and the following argument bleeds in. 16- and 24-byte structs pass correctly.Repro
E32must be ReadyToRun-compiled. Interpreted execution is correct.Expected
1|31,32,33,34|2Actual
1|32,33,34,2|0s.Areads the inputB,s.BreadsC,s.CreadsD,s.Dreads the trailingint y(2), andyreads garbage (0) — i.e. the struct argument is read one 8-byte word too high.Notes
{ long, long }) and 24-byte ({ long, long, long }) structs pass correctly; only the 32-byte (four-word) struct is affected.Configuration
-os browser -a wasm, CoreCLR,PublishReadyToRun(crossgen2,--obj-format:wasm)Note
This issue was written with the assistance of GitHub Copilot.