-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Clear the init-locals bit for CoreLib to workaround #1279 #13728
Conversation
int numVirtuals = RuntimeTypeHandle.GetNumVirtuals(declaringType); | ||
|
||
bool* overrides = stackalloc bool[numVirtuals]; | ||
new Span<bool>(overrides, numVirtuals).Clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd previously tried running all of the corefx tests with that hack to disable init locals, and I'd seen maybe three or four tests fail total... I assume this is the fix for those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this place in CoreLib used to depend on stackalloced memory to be zero-initialized. I have just found a second one in TraceLoggingEventSource.cs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Jan.
|
@dotnet-bot test this please |
@dotnet-bot test Ubuntu16.04 arm Cross Debug Build please |
@dotnet-bot test Ubuntu x64 Checked Build and Test please |
1 similar comment
@dotnet-bot test Ubuntu x64 Checked Build and Test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.