Skip to content

clang tidy pipeline fixes - #7657

Merged
The-E merged 4 commits into
scp-fs2open:masterfrom
The-E:ci/clang-tidy-pipeline-fixes
Jul 27, 2026
Merged

clang tidy pipeline fixes#7657
The-E merged 4 commits into
scp-fs2open:masterfrom
The-E:ci/clang-tidy-pipeline-fixes

Conversation

@The-E

@The-E The-E commented Jul 27, 2026

Copy link
Copy Markdown
Member

The clang-tidy setup was only valid for Linux builds; MacOS runners need a slightly different setup

The-E added 2 commits July 27, 2026 09:21
Install a version-matched clang-tidy on macOS and make the shared runner portable across both CI environments.
Emit DWARF4 debug information and suppress SDL's one-time initialization allocation so memcheck can report actionable failures.
The-E and others added 2 commits July 27, 2026 18:15
Now that the `[ "$CONFIGURATION" = "Debug" ]` typo is fixed, valgrind
actually runs on the Linux Debug legs again, and memcheck fails the build
on six "definitely lost" contexts (480 bytes) that all originate inside
SDL3's X11 backend at X11_CreateDevice, reached from SDL_VideoInit.

These aren't ours to fix: both call sites (os_init's SDL_Init and the
temporary video init in resolution_default(), reached via gr_init) already
pair their init with a matching quit, and the allocations are made and
kept by SDL/libX11 across SDL_VideoQuit. Collapsing the repeated init/quit
cycles would only reduce the block count, not the number of leak contexts,
so the build would still fail.

The suppression is truncated at X11_CreateDevice on purpose: it stays
caller-agnostic (covering both the os_init and gr_init paths) and avoids
matching on SDL_InitSubSystem_REAL.part.0, whose .part.0 suffix is a
partial-inlining artifact of how SDL3 happened to be built.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Linux clang-16 Debug leg fails memcheck on a single zero-byte block
lost in glibc's `_dl_find_object_update()`, reached from `dlopen()` while
SDL probes its video backends. It is loader bookkeeping that glibc keeps
by design, and it only shows up on some legs because it depends on how
many objects the loader has mapped by that point.

The file already carried three suppressions for this class, but each
pinned a full, exact glibc stack, so every new loader code path costs
another CI round. Replace them with a single block matching on
`_dl_open`: nothing of ours runs below that frame, only loader internals
and the static constructors of shared libraries the loader brings in, so
this gives up no coverage we care about while retiring the whole class.
All three removed blocks contain `_dl_open` themselves and are therefore
subsumed by it.

Both new suppressions match `definite,possible` rather than `definite`
alone, since `--errors-for-leak-kinds` defaults to `definite,possible`
and the same allocations would otherwise fail the build if valgrind ever
reported them as possibly lost instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@The-E
The-E merged commit 6e6b514 into scp-fs2open:master Jul 27, 2026
18 checks passed
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.

2 participants