-
Notifications
You must be signed in to change notification settings - Fork 5.2k
handle case of Proc Index > MAX_SUPPORTED_CPUS #109295
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
Conversation
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!
uint32_t proc_no = GCToOSInterface::GetCurrentProcessorNumber(); | ||
int adjusted_heap = proc_no_to_heap_no[proc_no]; | ||
// proc_no could likely exceed MAX_SUPPORTED_CPUS on x86 | ||
int adjusted_heap = proc_no_to_heap_no[proc_no % MAX_SUPPORTED_CPUS]; |
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 know this was code from before but do we need adjusted_heap
to be signed? Will there ever be a case where adjusted_heap is negative?
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.
don't believe that could occur.
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!
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/11600698630 |
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/11600735639 |
this issue affects x86 apps running on machine with > 64 cores.