-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[interp] Fixes for Vector3 Interop test #119025
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
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Fix contract violations in getClassAlignmentRequirement Basic implementation of CPOBJ in the interpreter Implement initblk in the interpreter
c32449a
to
aa81ad5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements fixes for Vector3 interop tests in the CoreCLR interpreter by addressing several critical issues. The changes focus on fixing alignment requirement checks and implementing missing IL opcodes that are needed for proper Vector3 interop functionality.
Key changes include:
- Fixing contract violations in
getClassAlignmentRequirement
by changing from leaf to non-leaf transitions - Implementing the
CPOBJ
IL opcode for copying objects by value - Implementing the
INITBLK
IL opcode for initializing memory blocks
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/coreclr/vm/jitinterface.cpp | Updates contract declarations and transitions for getClassAlignmentRequirement to handle potential GC triggers |
src/coreclr/vm/interpexec.cpp | Adds execution logic for the INTOP_INITBLK operation with null reference checking |
src/coreclr/interpreter/intops.def | Defines the new INTOP_INITBLK opcode in the interpreter operations table |
src/coreclr/interpreter/compiler.cpp | Implements compilation logic for CEE_CPOBJ and CEE_INITBLK IL opcodes, plus fixes type conversion for localloc |
void* dst = LOCAL_VAR(ip[1], void*); | ||
uint8_t value = LOCAL_VAR(ip[2], uint8_t); | ||
uint32_t size = LOCAL_VAR(ip[3], uint32_t); | ||
if (size && !dst) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The null check logic is incorrect. The condition should check if dst
is null when size > 0
, but the current logic size && !dst
will throw even when size is 0 and dst is null, which should be a valid no-op case according to .NET semantics.
if (size && !dst) | |
if (size > 0 && !dst) |
Copilot uses AI. Check for mistakes.
With these fixes and the fixes from #119020, JIT\SIMD\Vector3Interop_ro\Vector3Interop_ro gets to
All PInvoke testcases passed
now. The reverse p/invoke test cases don't pass yet, still.