-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Update MethodTable::IsDynamicStatics
and DacpMethodTableData::bIsDynamic
to return 0/1 instead of flag value
#106504
Conversation
Tagging subscribers to this area: @tommcdon |
@elinor-fung before eb8f54d return !TestFlagWithMask(enum_flag_StaticsMask, enum_flag_StaticsMask_NonDynamic); which is always 0 or 1 because of how |
MethodTable::IsDynamicStatics
and DacpMethodTableData::bIsDynamic
to return 0/1 instead of flag value
I went with both - switching the runtime back to always return 0/1 and also switching the DAC to always return 0/1 (so it won't be affected by any inadvertent change in the value from the runtime). |
I'm not sure whether this meets the bar for backports to RC1, but this now leaves net9.0 as the only runtime that returns non-0/1. |
It likely is OK for rc2. Easy enough to do a bar check. |
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10457525842 |
MethodTable::IsDynamicStatics
just gets the flagruntime/src/coreclr/vm/methodtable.h
Lines 2570 to 2574 in c88c31b
So if it is set, it returns the flag value (0x2)
DAC just sets
DacpMethodTableData::bIsDynamic
toMethodTable::IsDynamicStatics
.Change both to return TRUE/FALSE instead of the flag value. Per #106504 (comment), this was the behaviour until somewhat recently.