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

Report RhpInitialDynamicInterfaceDispatch reference in gfids #103948

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Jun 25, 2024

Some subset of tests is failing with control flow guard enabled because we're not able to indirectly call RhpInitialDynamicInterfaceDispatch. It's not clear why since we address take this method in C++ source files as well, but we should be reporting this from our object file too and doing that fixes it.

Fixes #103798

Cc @dotnet/ilc-contrib

Some subset of tests is failing with control flow guard enabled because we're not able to indirectly call `RhpInitialDynamicInterfaceDispatch`. It's not clear why since we address take this method in C++ source files as well, but we should be reporting this from our object file too and doing that fixes it.
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -267,17 +267,17 @@ static CORINFO_InstructionSet lookupInstructionSet(const char* className)
{
if (strncmp(className + 6, "128", 3) == 0)
{
assert((className[9] == '\0') || (strcmp(className + 9, "`1") == 0));
//assert((className[9] == '\0') || (strcmp(className + 9, "`1") == 0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintended change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See commit title f71b073

Outerloop is on the floor again and I'm getting really tired being the janitor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub UI only showed me the first two commits in the list and thus I didn't see the title. Must have been some glitch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fix for this up here: https://github.com/dotnet/runtime/pull/103995/files

However, the fact that the assert triggered looks to be a bug in NAOT, as there are types being marked as [Intrinsic] which should not be marked [Intrinsic] and which are not marked as such in the actual managed implementation.

@@ -44,6 +44,11 @@ public abstract partial class NodeFactory
ObjectDataInterner dataInterner)
{
_target = context.Target;

InitialInterfaceDispatchStub = _target.Architecture == TargetArchitecture.ARM
? new InitialInterfaceDispatchStubNode()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering whether the special ARM dispatch stub wrapper is still necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to delete that in a different PR and see what the CI says, but I don't have hardware to test it on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing it in CI should be good enough if you would like to give it a try.

I think this was only needed for multi-.dll Windows arm32 support that we do not have anymore.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (with workarounds reverted)

@MichalStrehovsky
Copy link
Member Author

/ba-g only deleted old workarounds and #103215 needs this and I'm going to bed

@MichalStrehovsky MichalStrehovsky merged commit b8b3bf2 into dotnet:main Jun 25, 2024
8 of 14 checks passed
@MichalStrehovsky MichalStrehovsky deleted the fix103798 branch June 25, 2024 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 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.

Failure in the Exceptions smoke test with CFG
4 participants