Skip to content

Undo a non-determinism workaround. #272

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 1 commit into from
Jun 19, 2020

Conversation

erozenfeld
Copy link
Member

I added a workaround for disassembly non-determinism in #255.
See #255 for details of what causes the non-determinism.
It turns out it relied on a reflection hole that allowed
init-only static fields to be modified after static constructor has
been called. That hole was fixed in dotnet/runtime#37849
so the workaround is no longer valid and causes an exception from pmi.

I don't see a way to work around the non-determinism without changing
framework code so for now I'm just reverting the workaround. Unfortunately, that
means that we can get non-deterministic disassembly for any method that inlines
System.Threading.Thread.GetCurrentProcessorId.

Fixes #271.

I added a workaround for disassembly non-determinism in dotnet#255.
See dotnet#255 for details of what causes the non-determinism.
It turns it relied on a reflection hole that allowed
init-only static fields to be modified after static constructor has
been called. That hole was fixed in dotnet/runtime#37849
so the workaround is no longer valid and causes an exception from pmi.

I don't see a way to work around the non-determinism without changing
framework code so for now I'm just reverting the workaround. Unfortunately, that
means that we can get non-deterministic disassembly for any method that inlines
System.Threading.Thread.GetCurrentProcessorId.

Fixes dotnet#271.
@erozenfeld
Copy link
Member Author

@dotnet/jit-contrib PTAL

@kunalspathak
Copy link
Member

I remember seeing some error around this on ARM64 when I was doing jit-diff.dll diff --pmi.

Copy link
Contributor

@briansull briansull left a comment

Choose a reason for hiding this comment

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

LGTM

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.

jit-diff fails with "Cannot set initonly static field ..."
3 participants