Repository navigation
ci(sanitizers): build the sanitizer passes with line tables only (#3457) - #3460
Merged
Merged
Conversation
…#3457) The passes build with the build type's -g (RelWithDebInfo for asan and tsan, Debug for valgrind), full DWARF, while their reports and triage only use file:line frames. A cold asan build through zccache on 4 cores: 1015 s and a 4.5 GB compiler cache with -g, 760 s and 3.4 GB with -g1. The new test asks configure_command() for -g1 in the build type's own flags (CMAKE_<LANG>_FLAGS_<CONFIG>), which CMake puts after CMAKE_<LANG>_FLAGS, so it replaces the build type's -g. Fails: test_configure_builds_line_tables_only (asan, tsan, valgrind: no -DCMAKE_C_FLAGS_<CONFIG> in the configure line). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ly (#3457) configure_command() sets CMAKE_C_FLAGS_<CONFIG> and CMAKE_CXX_FLAGS_<CONFIG> for the tool's build type from BUILD_TYPE_FLAGS: CMake's own RelWithDebInfo and Debug flags with -g1 in place of -g. The tool flags stay as they are. Checked on a local -g1 build against the nightly's -g reports (master d2efb3a): the asan leak reports of test_media_alpha_network have the same 7 reports, the same OBS stacks and the same 105 frames (42 with file:line, 33 inlined). The tsan races of test_view, test_audio_io, test_audio_controls, test_task and test_async_delay_audio name the same locations, with the same share of file:line frames; the races that differ are the timing-dependent ones that come and go between runs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=865507d42af1f0ce4f60c71ccfd44fc408c333e1 secs=271 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a Ci-Attestation: {"at":1793571861,"gate":"rust/all/fmt","host":"linux-x86_64","key":"5ea68102821d11a25b563d206084d22025db47140f4a96b205f178a15d299e10","lane":"lint","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":80,"stamp":"afead775a4a841a001dc9f36371e7b7d","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"5ea68102821d11a25b563d206084d22025db47140f4a96b205f178a15d299e10","lane":"lint","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":80,"stamp":"ee90f8202e5022fce42440a521c2ce03","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"6064b3fd17d630294f096b93e21f8a544565f2e6f069fb40051908ec838d65de","lane":"rust-test","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":84,"stamp":"99ea2fdc6bedcd1107b79db47c1bdafb","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"23f1c2cca5f008889b46dc13396b73c8579e6a6df28447a8a319dd4c53ac2db7","lane":"cross","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":55,"stamp":"56aec941f53b3af8d930da6eeff8c730","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"23f1c2cca5f008889b46dc13396b73c8579e6a6df28447a8a319dd4c53ac2db7","lane":"cross","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":55,"stamp":"0563d684cdc8fe655a2c319b0e8ed55f","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"23f1c2cca5f008889b46dc13396b73c8579e6a6df28447a8a319dd4c53ac2db7","lane":"cross","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":55,"stamp":"52616034e6073a1eb61302102a349656","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"23f1c2cca5f008889b46dc13396b73c8579e6a6df28447a8a319dd4c53ac2db7","lane":"cross","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":55,"stamp":"c338a386b6272b31abdf4e0ed1868293","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"} Ci-Attestation: {"at":1793571861,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"55e635df86272cf1221e8ee26703eba3f4743c9ae53e1632e72ecb46a9dcec0a","lane":"tier2-linux","parents":["13a1123230c7c0cb09cda619d8ac008f1605ea8c"],"secs":271,"stamp":"7bf4f2e40ac4674811770d4a8e30b572","tree":"865507d42af1f0ce4f60c71ccfd44fc408c333e1","v":1,"via":"run"}
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.
Fixes #3457. Refs #3249.
What
The sanitizer passes built with the build type's
-g(RelWithDebInfofor asan and tsan,Debugfor valgrind), full DWARF, while their reports and triage only usefile:lineframes.configure_command()now setsCMAKE_C_FLAGS_<CONFIG>andCMAKE_CXX_FLAGS_<CONFIG>fromBUILD_TYPE_FLAGS: CMake's own flags with-g1in place of-g. CMake puts these afterCMAKE_<LANG>_FLAGS, so-g1inTOOL_FLAGSwould lose to the build type's-g. The tool flags stay as they are.Why
A cold asan build, 4 pinned cores as on the 4-vCPU runner, through zccache as in CI (master 3f39ef6):
-g-g1Reports keep their locations
Checked on a local
-g1build against the nightly's-greports (master d2efb3a):test_media_alpha_network(bug: media-playback: LeakSanitizer reports FFmpeg packet buffers in test_media_remux and test_media_alpha_network #3365 leak): the same 7 reports, the same OBS stacks (media.c.h:836→:932→:944→:1043;test_media_alpha_network.c:233→:269→:492), 105 frames in both, 42 withfile:line, 33 inlined.test_view,test_audio_io,test_audio_controls,test_task,test_async_delay_audio: the same race locations and the same share offile:lineframes. The races that differ come and go between runs (timing);obs.c.hlines differ by the fix(libobs): obs_shutdown() lets a scene release its items before it destroys what is left (#3441) #3442 shift only.Debugbuild gets-g1as well, which keeps the line tables valgrind reads.RED → GREEN
test_configure_builds_line_tables_onlyinci/test_sanitize_harness.pyfails for asan, tsan and valgrind (no-DCMAKE_C_FLAGS_<CONFIG>in the configure line).This PR does not run the sanitizer passes in PR CI (
sanitize.pyis not a ratcheted compile input). The next nightly is the first run with-g1; a dispatch on a separate ref can measure it before.🤖 Generated with Claude Code