Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Jan 5, 2022

These structures are valuetypes, but their mint_type is a primitive. This means that a LDFLD applied on the type would have attempted to do a pointer dereference, because it saw that the current top of stack is not STACK_TYPE_VT. This was fixed in the past by passing the managed pointer to the valuetype rather than the valuetype itself, against the normal call convention, which lead to inconsistencies in the code.

This commit removes that hack and fixes the problem by ignoring LDFLD applied to nint/nfloat valuetypes in the first place.

Backport of #21382

These structures are valuetypes, but their mint_type is a primitive. This means that a LDFLD applied on the type would have attempted to do a pointer dereference, because it saw that the current top of stack is not STACK_TYPE_VT. This was fixed in the past by passing the managed pointer to the valuetype rather than the valuetype itself, against the normal call convention, which lead to inconsistencies in the code.

This commit removes that hack and fixes the problem by ignoring LDFLD applied to nint/nfloat valuetypes in the first place.
@BrzVlad
Copy link
Member Author

BrzVlad commented Jan 12, 2022

@monojenkins build Windows x64 FullAOT+LLVM

@BrzVlad
Copy link
Member Author

BrzVlad commented Jan 12, 2022

@monojenkins build Windows i386

@BrzVlad
Copy link
Member Author

BrzVlad commented Jan 13, 2022

@marek-safar can we merge this ?

@marek-safar
Copy link
Member

@BrzVlad go ahead

@BrzVlad BrzVlad merged commit 45efaa3 into mono:2020-02 Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants