Conversation
Newer Clang releases expose latent ownership and error-handling issues, while the analyzer preset currently produces a GCC compilation database that Clang cannot reliably consume. This patch selects Clang explicitly for the analyzer preset, fixes the reported leaks, unchecked stream calls, and directory scanning under a mutex, and reshapes the remaining flagged code so the analyzer can follow it. That gives ATS a clean diagnostic baseline before the job moves to Ubuntu 26.04. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Uninitialized values and redundant initializations cause analyzer warnings in the 10.1.x branch. This patch initializes the affected locals and uses a value-initialized container for volume sorting. It backports apache#12226. (cherry picked from commit 0cf0f3e)
Clang 21 still flags the unguarded insertion-sort path used for SRV records, even after the pointer array is initialized. This keeps the 10.1.x analyzer job failing after the earlier analyzer fixes. This branch backports apache#13593 and apache#12226, and uses stable sorting with the existing SRV comparator. The sort preserves priority/key ordering while avoiding the analyzer's unguarded-sort false positive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clang 21 still flags the unguarded insertion-sort path used for SRV
records, even after the pointer array is initialized. This keeps the
10.1.x analyzer job failing after the earlier analyzer fixes.
This branch backports apache#13593 and
apache#12226, and uses stable sorting with the existing
SRV comparator. The sort preserves priority/key ordering while avoiding
the analyzer's unguarded-sort false positive.