mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-06-09 14:45:55 -04:00
Add a clang AddressSanitizer + UndefinedBehaviorSanitizer workflow that builds rsync with -fsanitize=address,undefined -fno-sanitize-recover=undefined -DNDEBUG and runs the full test suite over both the stdio-pipe and TCP daemon transports. UBSAN_OPTIONS=halt_on_error=1 together with -fno-sanitize-recover=undefined makes any undefined behaviour fatal, so this job gates: the tree must stay UBSan-clean. The remaining findings are fixed in code (hashtable/mdfour shifts, xattrs, and log.c's file_struct, kept aligned via rounding.h); only byteorder.h's intentional unaligned accessors are suppressed, with no_sanitize. -DNDEBUG builds as a release does (assert() compiled out) so ASan covers the production code paths. Runs on push/PR to master and via workflow_dispatch, plus a weekly cron to catch breakage from a moving ubuntu-latest/clang toolchain (push/PR already cover every code change, so daily would just re-run an unchanged tree).