Skip to content
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

Implement support for BEGIN/END_ILLINK_FEATURE_SWITCH in CoreLib/EE interface validation #106151

Merged

Conversation

jkoritzinsky
Copy link
Member

Fixes #55950.

Also remove an unused and undefined method from the CoreLib/EE interface

@elinor-fung
Copy link
Member

elinor-fung commented Aug 8, 2024

Doesn't the normal (non-extended) check also need to be updated? OffsetAndSizes doesn't handle BEGIN/END_ILLINK_FEATURE_SWITCH, so CoreLibBinder::Check would fail trying to find the classes or fields?

const CoreLibBinder::OffsetAndSizeCheck CoreLibBinder::OffsetsAndSizes[] =
{
#define DEFINE_CLASS_U(nameSpace, stringName, unmanagedType) \
{ PTR_CSTR((TADDR) g_ ## nameSpace ## NS ), PTR_CUTF8((TADDR) # stringName), sizeof(unmanagedType), 0, 0, 0 },
#define DEFINE_FIELD_U(stringName, unmanagedContainingType, unmanagedOffset) \
{ 0, 0, 0, PTR_CUTF8((TADDR) # stringName), offsetof(unmanagedContainingType, unmanagedOffset), sizeof(((unmanagedContainingType*)1)->unmanagedOffset) },
#include "corelib.h"
};

@jkoritzinsky
Copy link
Member Author

You're right! I've pushed an update with support in the regular Check method as well.

src/coreclr/vm/corelib.h Show resolved Hide resolved
src/coreclr/vm/binder.cpp Outdated Show resolved Hide resolved
@jkoritzinsky jkoritzinsky merged commit 8fe777f into dotnet:main Aug 9, 2024
88 of 90 checks passed
@jkoritzinsky jkoritzinsky deleted the extended-check-illink-feature-switch branch August 9, 2024 21:03
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BEGIN_ILLINK_FEATURE_SWITCH mechanism for corelib.h does not work with checked/debug runtime and a trimmed app
2 participants