Skip to content

[WIP] Interpreter unsafe accessor tests #116110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

kg
Copy link
Member

@kg kg commented May 29, 2025

This PR attempts to add tests for unsafe accessor support in the interpreter. They appear to already work in certain scenarios, but not others, so I'm putting up this draft to make it easier for other people to see what's going on.

Changes in this PR:

  • Add tests for unsafe field and method accessors.
  • When method compilation fails, flow that out as CORJIT_BADCODE instead of CORJIT_OK.
  • Assert when setting a precode target that it is not interpreted code. (Setting interpreted code as a precode target will just crash us later, it's never correct and indicates a bug elsewhere.)

Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Add unsafe accessor tests (broken)

Unsafe accessor tests pass

Assert when setting interpreter IR as a precode target

Repro for issue
@kg kg force-pushed the unsafeaccessor branch from 22476c5 to 9fb2741 Compare June 13, 2025 18:15
@kg
Copy link
Member Author

kg commented Jun 16, 2025

The remaining issues in this set of tests are fixed by #116661

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

Successfully merging this pull request may close these issues.

2 participants