Skip to content

Restore Clang analyzer checks on 10.1.x - #4

Merged
cmcfarlen merged 3 commits into
cmcfarlen:10.1.x-picks-20260914from
bneradt:backport-clang-analyzer-10-1
Sep 15, 2026
Merged

cmcfarlen merged 3 commits into
cmcfarlen:10.1.x-picks-20260914from
bneradt:backport-clang-analyzer-10-1

Conversation

@bneradt

@bneradt bneradt commented Sep 15, 2026

Copy link
Copy Markdown

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.

bneradt and others added 3 commits September 14, 2026 21:48
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.
Copilot AI lite review requested due to automatic review settings September 15, 2026 03:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cmcfarlen
cmcfarlen merged commit 7fb5ab1 into cmcfarlen:10.1.x-picks-20260914 Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants