Uh oh!
There was an error while loading. Please reload this page.
CoreCLR: Add missing null guard - #126704
Conversation
Tagging subscribers to this area: @agocke, @dotnet/gc |
There was a problem hiding this comment.
Pull request overview
This PR fixes a GCC Release build failure in CoreCLR’s Unix cgroup memory usage code by adding a missing null guard before formatting a path string with asprintf, avoiding a -Werror=format-overflow= warning when the cgroup path is null.
Changes:
- Add an early return in
GetCGroupMemoryUsagewhens_memory_cgroup_pathis null to prevent passing a null%sargument toasprintf.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AustinWise
commented
Apr 9, 2026
The equivalent function in Mono ( |
trungnt2910
commented
Apr 9, 2026
Done. I have updated the other file. It seems like the build configuration for Mono is a bit more lenient towards warnings, so the GCC builds did not report that as an error. |
This fixes Release builds using GCC.
Uh oh!
There was an error while loading. Please reload this page.
This fixes Release builds using GCC.
Without this patch, these builds fail with:
Part of #55803.