Optimizer: fix accessing captured values when skipping inlining - #20089
Conversation
This comment has been minimized.
This comment has been minimized.
Head branch was pushed to by a user without write access
6f53591 to
ae4fe1b
Compare
|
|
This is ready. |
|
🔍 Tooling Safety Check — Affects-Compiler-Output
|
|
/backport to release/10.0.4xx Resurfaced as #20297 against SDK 10.0.400 — |
|
Started backporting to |
|
/backport to release/dev18.9 |
|
/backport to release/dev18.10 |
|
Started backporting to |
|
Started backporting to |
|
@T-Gro an error occurred while backporting to |
|
@T-Gro an error occurred while backporting to |
|
/backport to release/dev18.9 |
|
/backport to release/dev18.10 |
|
Started backporting to |
|
Started backporting to |
…20299) * Test: debug-inline capture of a local function from a nested-closure callsite Regression coverage for #20297. The reduced repro keeps the reported shape - a captured local function, a callsite inside a nested closure, and '>>' composition - and crashes with AccessViolationException on release/10.0.4xx, where <addEnum>__debug@N is emitted as a two-argument static method that does 'ldarg.0; ldfld tee' against the string parameter. It passes once #20089 is present. SRTP 30-38 all call the inline function directly from the enclosing method, so none of them cover a callsite inside a closure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Minimize SRTP 39 debug-inline capture repro test Address review feedback: strip printfn and addName noise from the repro so the emitted-IL baseline is easier to follow. The minimized source keeps all essential ingredients (inline function whose body is a lambda capturing an outer local 'tee', used first-class inside a nested closure via >>) and the SRTP 'int value'/ExplicitDynamic aspect, so <addEnum>__debug@N still reaches the captured local through a closure field. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com>
Fixes the captured values repro from #20063.