-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix build breaks with clang 21 #120644
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
Fix build breaks with clang 21 #120644
Conversation
Contributes to dotnet#119706
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
vcsjones
left a comment
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.
The crypto changes look good.
Do we know when it is likely we are going to get a CI pipeline with clang 21? This seems likely to introduce again unless CI blocks it.
Opened #120645 . |
|
@jkotas thanks for addressing this! Can these changes be backported to .NET 10, and perhaps also earlier .NET versions? |
|
We do not backport fixes for C/C++ compiler warnings. We disable C/C++ warnings in release branches instead. I see that we forgot to do that for .NET 10. #120693 is fixing this. |
|
@jkotas The changes for |
We can propose backport of all fixes required to make clang 21 work in your setup once we understand the full set. cc @AaronRobinsonMSFT . |
Contributes to #119706
## Customer Impact - [x] Customer reported - [ ] Found internally These issues were reported in #119706 as problems with clang-21 on Fedora 43. The investigation uncovered that clang introduced a potentially breaking change in clang-20 that we do not currently consume. These build changes impact VMR related builds when linux distrobutions performing source build adopt clang-21. clang-20 breaking change log - https://releases.llvm.org/20.1.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes. This PR contains the minimal changes needed to fix issues from the following PRs #120644 and #120775. ## Regression - [x] Yes - [ ] No Moving to the new clang-21 compiler will cause the runtime to crash. This is a regression from using .NET 10 and the default compiler of clang-19. ## Testing This has been validated using various legs and examples to demonstrate the usage of undefined behavior these flags convert into "defined" behavior in C/C++. ## Risk Low. This makes clang-21 more permissive and is limited to non official product builds. --------- Co-authored-by: Jan Kotas <[email protected]>
Contributes to #119706