Fix macOS + Determinism check CI on master - #42
Merged
Merged
Conversation
…tion; crash-handler write() under Release -Werror macOS (Intel + arm64) jobs: samples/hello/hello-baseline.cpp:179 — std::min(emitted, baseline_.size()) mixes std::uint64_t with std::size_t. On macOS uint64_t is unsigned long long and size_t is unsigned long, so the template deduction is a hard AppleClang error. On Linux/Windows the two types alias, which is why every other P0 job compiled the same source. Fix: cast the size_t operand to uint64_t so both arguments are one type on every platform. Determinism check job: src/laige-core/logging.cpp:500 — (void)write(...) does not suppress glibc's warn_unused_result (the attribute is attached under fortification, i.e. optimized builds), and the engine's -Werror makes it fatal. That is why only the job's Release g++ tree (build-det-release) failed while Debug g++ and every clang tree compiled the same TU. Fix: consume the result — the crash notice is best-effort and there is no async-signal-safe fallback if the write fails (LOG-007). Verification (local: g++ 16.2.1 / clang++ 22.1.8, x86-64 Linux): - logging.cpp compiles clean under -Wall -Werror in Debug, Release, and Release+_FORTIFY_SOURCE=2 (the CI trigger); hello sample TUs clean under all four compiler/flag sets. - Full ctest: 82/82 (incl. hello_baseline_fpx/fp32 + the mismatch/truncated/malformed/missing fixtures, replay and detcheck suites). - The CI detcheck flow reproduced end to end: four targeted builds (g++ Debug, clang++ Debug, clang++ Debug+ASan, g++ Release), reference-baseline sanity on both backends, synthetic self-check, and pairs A (g++ Debug vs clang++ Debug) and B (ASan Debug vs Release) on both backends — all result=OK ticks=301. - The macOS deduction error cannot be reproduced off-AppleClang (uint64_t == size_t on Linux/Windows); the P0 macOS jobs are the regression guard for it, as for the prior macOS CI fixes (#33, #35, #37, #39).
offdev
added a commit
that referenced
this pull request
Sep 17, 2026
…0 platforms supported (#43) Follow-up noted in PR #42: the report's macOS/Windows support-list rows were 'pending first merge run' and, per the report's own policy, convert from first merge-run results. The first green full-matrix merge run (master push of a22c45d, CI run 35246893883, 11/11 jobs green) is now recorded: macos-arm64, macos-intel and windows-msvc are supported (each P0 job reproduced both committed baselines per tick, 82/82 ctest); the merge detcheck job passed reference-baseline sanity (2/2 backends), the synthetic self-check, and all four cross-build pairs (result=OK ticks=301). The stale 'Open until the first merge' section is replaced by a 'First merge run (2026-09-17)' section that also records the red first merge (run 35240883610 at c8ce649, fixed by #42). Docs only; no baselines regenerated (no desync occurred).
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.
What was red on master
Run 35240883610 (CI merge, 2026-09-17) had three failed jobs, two distinct root causes:
samples/hello/hello-baseline.cpp:179: error: no matching function for call to 'min'src/laige-core/logging.cpp:500: error: ignoring return value of 'ssize_t write(...)' [-Werror=unused-result]— only in the job's Release g++ tree (build-det-release)Root causes
macOS —
std::mintype deduction.std::min(emitted, baseline_.size())mixesstd::uint64_twithstd::size_t. On macOSuint64_tisunsigned long longwhilesize_tisunsigned long, so template deduction is a hard AppleClang error. On Linux/Windows the two types alias, which is why every other P0 job compiled the same source (and why this only surfaced on the first merge that runs the M1-DET-04 baseline machinery on macOS). Fix: cast thesize_toperand touint64_tso both arguments are one type on every platform.Determinism check —
warn_unused_resultunder fortification. glibc declareswrite()withwarn_unused_result, and the attribute is attached only under fortification — i.e. optimized builds (that's the exact Debug-passes/Release-fails split:-gleaves__wurempty,-O3enables it). A(void)cast does not suppresswarn_unused_result, and the engine's-Werrormakes it fatal. Clang/AppleClang/MSVC don't have this GCC diagnostic, so only the Release g++ tree failed. Fix: consume the result — the crash notice is best-effort, and there is no async-signal-safe fallback if the write fails (LOG-007).Verification (local: g++ 16.2.1 / clang++ 22.1.8, x86-64 Linux)
logging.cppcompiles clean under-Wall -Werrorin Debug, Release, and Release +_FORTIFY_SOURCE=2(reproducing the CI trigger before/after); hello sample TUs clean under all four compiler/flag sets.hello_baseline_fpx/hello_baseline_fp32+ the mismatch/truncated/malformed/missing fixtures, replay and detcheck suites.result=OK ticks=301.uint64_t == size_ton Linux/Windows); the P0 macOS jobs are the regression guard for it, as for the prior macOS CI fixes ([M1-HEAD-01] Fix macOS CI: platform-dependent zero-warn assertion in SecondRunFailsWithoutLogging #33, [M1-DET-01] Fix Windows CI: quote the trait_compile fixture compiler invocation #35, [M1-DET-02] Fix macOS/Windows CI: replay test fopen C4996; exact tick count under frame budget 1 #37, [M1-DET-03] Fix macOS/Windows CI: replay tool strncpy C4996; exact tick count for bounded laige-run; CRLF-tolerant replay check script #39).Out of scope / follow-up
docs/benchmarks/determinism-matrix.mdmarks macOS/Windowsfloat_pinned_32as pending first merge run; those rows update from the first green merge (matrix policy: entries change only by matrix results).hello_baseline_fp32desyncs, the documented policy is to mark it unsupported + skip —fixed_point_16_16failures are never skipped.