Skip to content

ci(sanitizers): compile the sanitizer passes without FP contraction (#3362) - #3428

Merged
vpacher merged 2 commits into
masterfrom
fix/3362-sanitizer-fp-contract
Nov 1, 2026
Merged

vpacher merged 2 commits into
masterfrom
fix/3362-sanitizer-fp-contract

Conversation

@vpacher

@vpacher vpacher commented Nov 1, 2026

Copy link
Copy Markdown
Member

Fixes #3362. Refs #3238, #3290, #3422.

Why

test_transition_render_steps fails in every sanitizer pass on the CI runner and passes in Tier 2. A probe in the asan job (throwaway run 41302656328) showed obs_source_transition_render_offset() compiled to vfnmadd231ss/vfnmadd132ss, a fused multiply-add, from zccache and from a fresh compile of the same command without zccache alike. The command has no -march, -mfma or -ffp-contract flag: the runner's gcc fuses by default. The Tier 2 image's gcc (the same version, 15.2.0) defaults to -march=x86-64 with -mfma disabled and emits mulss + subss. Rust never fuses a multiply and an add.

So the cause is not a build-flag difference in the harness, as #3362 assumed, but the host's compiler default. The project-wide question (every C build on a bare runner) is #3422.

What changes

Commits

  • RED 505290d: the harness test expects -ffp-contract=off in every pass's flags; the known-list entry goes. Fails test_tool_flags_and_build_type.
  • GREEN 1b3845b: the flag.

Tests

test_transition_render_steps in an asan build on a local build box, with -march=x86-64-v3 added to force what the runner's gcc does:

  • without -ffp-contract=off: vfnmadd231ss/vfnmadd132ss, exit 2, offset(1920, 1080, 1000, 1000, 3f8a3d71, 3f8a3d71): got 4451ffff b8340000, want 44520000 00000000, the same as the runner
  • with it: vmulss + vsubss, 16/16 pass

The sanitizer ci/ tests: OK. Local gate, stamped head 1b3845b: 4 min 30 s (lint 78 s, rust-test 105 s, cross 86 s, tier2-linux 268 s).

Checklist

🤖 Generated with Claude Code

vpacher and others added 2 commits November 1, 2026 13:37
…ion (#3362)

test_transition_render_steps fails in every sanitizer pass on the CI
runner and passes in Tier 2. A probe in the asan job (throwaway run
41302656328) showed obs_source_transition_render_offset() compiled to
vfnmadd231ss/vfnmadd132ss, a fused multiply-add, both from zccache and
from a fresh compile of the same command without zccache. The command
has no -march, -mfma or -ffp-contract flag: the runner's gcc fuses by
default. The Tier 2 image's gcc (same version, 15.2.0) defaults to
-march=x86-64 with -mfma disabled and emits mulss + subss. Rust never
fuses a multiply and an add.

The harness test now expects -ffp-contract=off in every pass's flags,
and the known-list entry of #3362 goes, so the asan job counts the test
again.

Fails: test_tool_flags_and_build_type.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ction (#3362)

asan, tsan and valgrind add -ffp-contract=off to their C and C++ flags,
so the runner's gcc rounds each product before the next operation, as
the Tier 2 image's gcc and Rust do. Sanitizer and harness tests: OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=d4ddbba7dac89e22d17079e19ec0918605818338 secs=269 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a
Ci-Attestation: {"at":1793536932,"gate":"rust/all/fmt","host":"linux-x86_64","key":"2a7ea3f9f14f913c90be8c308ae7adef6216fc5e3812b1df25ad2a47ee83d290","lane":"lint","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":78,"stamp":"06e2dd6e9b814831cf93928ccf5f6f32","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"2a7ea3f9f14f913c90be8c308ae7adef6216fc5e3812b1df25ad2a47ee83d290","lane":"lint","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":78,"stamp":"7ac65bde29a931a06964ee678a760af7","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"c549c186be7734309960c0c9b5f6f39a701586ebd300547ca4de550d03294fca","lane":"rust-test","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":105,"stamp":"0a3dd79e2d2e02eb603b986d12570ccf","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"facd825317dae45ddf8228f217393231535ccd142e9a17b1980985333a4013ba","lane":"cross","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":86,"stamp":"c661bcbd4e8a761ba5c54ea5e98c4bf6","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"facd825317dae45ddf8228f217393231535ccd142e9a17b1980985333a4013ba","lane":"cross","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":86,"stamp":"4ec7a0799a8af32d898e46efa20bd8df","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"facd825317dae45ddf8228f217393231535ccd142e9a17b1980985333a4013ba","lane":"cross","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":86,"stamp":"f68a9a7de57eac22df51eefd69e4b5b1","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"facd825317dae45ddf8228f217393231535ccd142e9a17b1980985333a4013ba","lane":"cross","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":86,"stamp":"a042c98d561c261793ac240cc29b0638","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Ci-Attestation: {"at":1793536932,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"31190bcd3af49a566aafdad821139e7834e05873b7ede314c54d1d4869f321bf","lane":"tier2-linux","parents":["505290d6a63a19d05f5cda5b3846d2e4446217c0"],"secs":268,"stamp":"24ce2937c3c5702022f679149ac614f7","tree":"d4ddbba7dac89e22d17079e19ec0918605818338","v":1,"via":"run"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: test_transition_render_steps fails in the sanitizer builds (offset off by one bit)

1 participant