Repository navigation
test: Keep the audio_min_ts parity rate where util_mul_div64 fits on MSVC - #2420
Merged
Merged
Conversation
…MSVC audio_min_ts_parity::insufficient_matches draws the sample rate from all of usize. On MSVC x64 the C's util_mul_div64 is exact 128-bit math (_umul128 / _udiv128), which faults with STATUS_INTEGER_OVERFLOW when the quotient does not fit in 64 bits, so the C oracle crashed the whole obs-tests-core binary on windows-2025 (seen on obs-rust#2411, whose oracle change pulls obs-tests-core into the changed-crates run). The shim saturates there, so only the oracle faults. On MSVC x64 the rate now stays below 1e9, so t * rate / 1e9 fits for any t, as audio_mix_parity does since obs-rust#1909. Other hosts keep the full range (util_mul_div64 wraps there, and both sides wrap the same way). audio_discard_parity keeps its rates below 384 kHz and is not affected. Refs obs-rust#2405 Co-Authored-By: Claude Opus 5.5 <[email protected]>
zackees
approved these changes
Oct 25, 2026
zackees
left a comment
Member
There was a problem hiding this comment.
Reviewed. This matches the crash: test-diff: FAILED (3221225621) on #2411's and #2419's Windows Rust Tests is 0xC0000095, STATUS_INTEGER_OVERFLOW, from the oracle's _udiv128. Capping the rate below 1e9 on MSVC x64 only follows the existing MSVC_X64 const in audio_mix_parity.rs:61. Other hosts keep the full range, and the shim's saturation is still covered there. LGTM; queuing, since it unblocks #2411 and #2419.
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.
Refs #2405
Fixes a crash I introduced in #2406:
audio_min_ts_parity::insufficient_matchesdraws the sample rate from all ofusize. On MSVC x64 the C oracle'sutil_mul_div64is exact 128-bit math (_umul128/_udiv128), which faults withSTATUS_INTEGER_OVERFLOWwhen the quotient does not fit in 64 bits, so the wholeobs-tests-corebinary crashed onwindows-2025(run 40227191204 on #2411, whose oracle change pullsobs-tests-coreinto the changed-crates run). The shim saturates there; only the oracle faults.On MSVC x64 the rate now stays below 1e9, so
t * rate / 1e9fits for anyt, asaudio_mix_paritydoes since #1909. Other hosts keep the full range.audio_discard_paritykeeps its rates below 384 kHz and is not affected.Testing
obs_core::audio_min_ts*14/14 on macOS arm64; clippy-D warningsclean.Rust Tests (windows-2025-vs2026)is the check.Checklist
master-W..., ratchets): noneAI note: Claude Code (Claude Opus 5.5) wrote the change and this text under the submitter's direction.