[release/8.0-staging] Fix copy constructor injection for unsafe value classes#105961
Merged
jkoritzinsky merged 1 commit intodotnet:release/8.0-stagingfrom Aug 7, 2024
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
This comment was marked as outdated.
This comment was marked as outdated.
Member
|
No tests? |
5 tasks
Member
Author
|
I didn't backport the test since I had to manually backport this PR. I can add the test as well if desired. |
Member
|
cc @jakobbotsch for code review. |
jakobbotsch
approved these changes
Aug 6, 2024
JulieLeeMSFT
approved these changes
Aug 6, 2024
Member
Member
Author
|
Approved by tactics over email |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Issue #100751
main PR #105779
Description
C++/CLI structs with copy constructors and C-style fixed-length array fields can have a copy constructor missed. This case was missed in #100050. This PR makes a targetted change to disable the JIT feature that was causing the missed copy in Reverse P/Invoke IL stubs.
Customer Impact
Same customer impact as #100033 if the repro had a C-style fixed-length array field.
Regression
Regression from .NET Framework, not from modern .NET
Testing
We've added unit tests in main and manually validated in this branch that no copy constructors are missed.
Risk
Low risk. We control all code emitted into IL stubs so we don't need to worry about this feature being disabled.