Skip to content

Fix: Assert failure: Thread::IsObjRefValid #118307

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

Merged
merged 2 commits into from
Aug 3, 2025
Merged

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Aug 2, 2025

Fixes #117961

@Copilot Copilot AI review requested due to automatic review settings August 2, 2025 23:47
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 2, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 fixes an assert failure in Thread::IsObjRefValid by properly converting an Object pointer to an OBJECTREF using the appropriate conversion function. The issue occurs when handling constructor returns for variable-sized objects like strings.

Key Changes

  • Updates object reference handling in RuntimeMethodHandle_InvokeMethod to use proper type conversion
  • Replaces direct cast with ObjectToOBJECTREF function call for better type safety

@jkotas jkotas added area-VM-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 2, 2025
Copy link
Contributor

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

@jkotas jkotas requested review from BrzVlad, janvorli and kg as code owners August 3, 2025 17:46
@jkotas jkotas merged commit 94c22bb into dotnet:main Aug 3, 2025
97 checks passed
@jkotas jkotas deleted the issue-117961 branch August 3, 2025 22:03
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.

System.ComponentModel.TypeConverter.Tests.WorkItemExecution failure
2 participants