Repository navigation
Description
Location
libobs/obs-encoder.c.h:1720, do_encode: ept->pts = frame->pts, following da_push_back_new(encoder->encoder_packet_times).
Class
ASan heap-buffer-overflow, write of 8 bytes, 8 bytes before a 2592-byte allocation, in existing test_encoding_lag_rescale.
How it is reached
The existing local C characterization test creates its own dummy encoder/output and local canvases. Its encode callback sleeps optionally and returns no packet; it has no network input. This report concerns that trusted-local test lifecycle (low risk under SECURITY.md); no hostile input/reachability claim is made.
Observed on unrelated DeckLink compile-policy PR #3787, head 1aa14446307f51e1d573cebd6e1ab06f2d95ea6b, based on master ef696e998. Changed files are only the DeckLink private enum/default return, CMake warning opt-in and Python compile regression; no encoder, container, or existing C test changes. Hosted Format/Fast Gate and conversion replay pass.
Run: https://github.com/obs-rust/obs-studio/actions/runs/42315858830/job/128228529606
Download sanitize-asan, inspect tests/test_encoding_lag_rescale.log and tests/test_encoding_lag_rescale.asan.25496 for the complete report. Summary: 707/708 tests clean, one known excluded test; this test is the sole counted failure. Graphics unloaded-library init leaks are explicitly external/not counted.
Stack: do_encode:1720 → receive_video:1837 → obs_media_io::ffi::video_io::LibobsHost::deliver → video_output::thread_main. Allocation is on the same T12 in bmalloc reached through receive_video.
Proposed fix and failing test
Investigate encoder packet-time array append/reset synchronization during force-stop/release versus the video delivery thread; obs_encoder_stop resets encoder_packet_times.num while do_encode appends. This is a hypothesis, not a diagnosed cause. Preserve the existing C test. Reproduce it under the ASan harness, then add focused coverage in the existing category if a race is confirmed; fix the lifecycle/synchronization and show the same test clean. Do not suppress it or add a known-list entry to land #3787.
Per docs/knowledge/asan-pr-failure.md, the unrelated failing job will be retried once after filing this report; no repeated reruns to obtain a pass.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 7, 2026
Claiming: #3788
Plan, one PR:
libobs/obs-encoder.c.hso it is never written while the encoder can still be delivering, then loop the test under ASan.First PR expected today. Not a remote path: reached only through local encoder start and stop.
test/cmocka: Pin the packet times across an encoder stop (RED, #3788)
libobs: Reset encoder packet times only while disconnected (#3788)
libobs: Stop resetting encoder packet times under a running encoder (o…