Skip to content

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

Closed

Description

@vpacher

What happens

test_transition_render_steps fails in every sanitizer pass (asan, tsan and valgrind), in every nightly run we checked. It passes in Tier 2. Two cases fail at test/cmocka/test_transition_render_steps.c:478 (check_offset):

offset(1920, 1080, 1000, 1000, 3f8a3d71, 3f8a3d71): got 4451ffff b8340000, want 44520000 00000000
offset(1, 1, 3, 3, 3eaaaaab, 3eaaaaab): got b3000000 b3000000, want 00000000 00000000

obs_source_transition_render_offset() computes tr_cx - source_cx * scale_x. With scale_x = 1.08f, the product rounded to float is 1080.0, so the result is 840.0 (44520000). The sanitizer builds give 839.99994 (4451ffff), and the y offset 1080 - 1000 * 1.08f gives -4.3e-5 instead of 0. The test compares bit patterns.

Probable cause

Those results are what a fused multiply-add gives (no rounding between the multiply and the subtract). So the sanitizer builds compile this code with FMA contraction and Tier 2 does not. The sanitizer passes configure with their own flags (rust/tools/sanitize/sanitize.py). Which flag lets the compiler fuse here is not known yet.

What to do

  • Find the build-flag difference. If it is FP contraction, give the sanitizer passes the same floating-point flags as Tier 2.

Seen in nightly 41203573843 and in the #3290 runs 41237708627, 41246480225, 41247123560.

The sanitizer harness's known list (rust/tools/sanitize/triage.py, #3290) has this as kind bug: the asan job does not count it, but fails once the test runs clean. So the fix PR also drops the entry.

Activity

  1. added
    infra
    P2
    size:S
    on Nov 1, 2026
  2. vpacher commented on Nov 1, 2026

    @vpacher
    MemberAuthor

    /ready

  3. added
    ready
    on Nov 1, 2026
  4. vpacher commented on Nov 1, 2026

    @vpacher
    MemberAuthor

    Claiming: the sanitizer builds fuse the offset multiply-add

    Plan (one PR, after #3290):

    1. Find the flag: compare the compile line of obs-source-transition-render in the asan build (compile_commands.json) with Tier 2.
    2. RED: a harness test that the sanitizer configure carries the floating-point flags Tier 2 builds with.
    3. GREEN: pass them; test_transition_render_steps passes under asan, tsan and valgrind.
    4. Drop its bug entry from the known list.

    First PR: after #3290 merges.

  5. vpacher commented on Nov 1, 2026

    @vpacher
    MemberAuthor

    Blocked: waiting on #3290

  6. added
    claim-blocked
    on Nov 1, 2026
  7. removed
    claim-blocked
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2infrareadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions