Skip to content

Invoke debugger function evaluations through managed UCO - #133659

Draft
jkoritzinsky wants to merge 1 commit into
dev/jkoritzinsky/custom-attribute-constructorsfrom
dev/jkoritzinsky/func-eval-uco
Draft

Invoke debugger function evaluations through managed UCO#133659
jkoritzinsky wants to merge 1 commit into
dev/jkoritzinsky/custom-attribute-constructorsfrom
dev/jkoritzinsky/func-eval-uco

Conversation

@jkoritzinsky

@jkoritzinsky jkoritzinsky commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary

Layer 3 of the stack for #123864, following #133658. This completes the func-eval portion of the split discussed on #126542.

  • Replace native ABI argument packing and MethodDescCallSite invocation with a managed UCO entrypoint and the shared invocation emitter.
  • Preserve native validation and rooted receiver/argument/result storage, including unboxed receivers, reference-containing values, memory/register/literal argument homes, and copy-back ownership.
  • Keep raw byref and nullable results distinct from ordinary reflection result normalization.
  • Preserve exception propagation and safe/rude/exception-unwind abort recovery. Correct the native-helper abort contracts and true nullable backing-box copy-back uncovered during comparison.
  • Register the runtime-owned UCO exception path and preserve the browser/WASI callback entries.

Validation

Used the existing MDbg/xUnit debugger-test harness with a private CoreRun and ProjectK/CoreCLR-only configuration. The frozen set contains 20 rows: 18 passed, 0 failed, and 2 pre-existing skips, with no runner errors. It includes moving GC, receiver mutation, nullable copy-back, byref results, constructors, register arguments, nested/exception-time eval, and inspection cases.

Both nullable return/read assertions produce 59. Each of the three abort scenarios completes the eval callback, calls Echo(42), and detaches with MDbg exit 100. The cleanup-layer rerun retained all outcomes.

Runtime hashes and actual loaded modules were audited. The harness binaries, selected recorder scripts, and diagnostic test patch stayed unchanged; execution used direct CoreRun/xUnit/MDbg commands and configuration data, without session-state launch scripts or expectation changes. This is Windows x64 coverage, not proof of every architecture or debugger scenario.

The final cleanup layer is #133660.


Stack created with GitHub Stacks CLIGive Feedback 💬

Note

This PR description and implementation were prepared with GitHub Copilot. Commits that reuse am11's code retain the requested co-author attribution.

Complete the third layer of #123864 on the shared invocation foundation from #126542. Use rooted receiver/argument/result storage and the common managed emitter instead of native ABI packing. Preserve raw byref and nullable results, in-place receivers, register/literal semantics, exception propagation and abort recovery. Correct native-helper abort contracts and true nullable backing-box copy-back.

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@am11

am11 commented Sep 11, 2026

Copy link
Copy Markdown
Member

discussed on #126542.

nit: funceval was already split: #126809 so #126542 discussion is irrelevant.

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants