You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: obs-util: dstr_safe_printf one-pass port leaves a different capacity than C, so dstr_ops_match_c fails intermittently #1623
Since #1619 (one-pass dstr_safe_printf), the obs-util Tier 3 proptest tests::strings::dstr_parity::dstr_ops_match_c fails intermittently on master and on unrelated PRs (seen on #1622's Fast Gate, run 39622049384). The proptest picks random inputs, so it passes on some runs and fails on others.
C's dstr_safe_printf copies the format and then runs dstr_replace once per value, so its final capacity follows the growth of those steps. The one-pass Rust version writes the result once and allocates a different capacity. The contents are identical, and there is no memory-safety issue. The parity test compares capacity, so the Rust allocation has to follow the same growth rule (or the parity contract for capacity has to be stated differently, which would be a policy change).
Fix
Make the one-pass writer reserve the capacity the C passes end with, and add the shrunk case as a fixed Tier 3 regression so the proptest can't hide it.
Claiming: #1623. One PR: RED with the shrunk case as a fixed Tier 3 regression, then GREEN making the one-pass writer reserve the capacity C ends with. Today.
Activity
rdoupe commentedon Oct 21, 2026
Claiming: #1623. One PR: RED with the shrunk case as a fixed Tier 3 regression, then GREEN making the one-pass writer reserve the capacity C ends with. Today.
obs-util: Give one-pass dstr_safe_printf C's capacity and passes (obs…