-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Make initialization more consistent in gc.cpp
#75908
Make initialization more consistent in gc.cpp
#75908
Conversation
Tagging subscribers to this area: @dotnet/gc Issue DetailsUse Remove explicit static member initialization and instead rely on default initialization. Explicit array sizes were removed from the initialization path since they are only needed at declaration. I can put them back if preferred. Fixes #75893 /cc @Maoni0 @dotnet/gc
|
24a3840
to
b7eaadf
Compare
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 so much @AaronRobinsonMSFT. this looks great!
Shoot. It seems I missed something when creating a small repro outside of dotnet/runtime and my "fix" wasn't complete. The gc_mechanisms temp_settings = settings; I'll see what I can do tomorrow. |
new changes look good to me. thanks @AaronRobinsonMSFT! |
Use
= default;
forclass Volatile
ctor since it permits the compiler to optimize when used in a static context. This also makes the previously troublesome UB issue fixed in #74363 no longer exist - callingmemset
on a non-trivial type. Reverting some of the changes ingc.cpp
.Fixes #75893
/cc @Maoni0 @dotnet/gc