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: libobs: LeakSanitizer reports the context control of scenes alive at obs_shutdown (follow-up to #2038) #3364
The asan pass reports a direct leak in test_shutdown_canvas_weak_ref and test_shutdown_type_lifetime in every run:
Direct leak of 56 byte(s) in 1 object(s) allocated from:
#2 bzalloc libobs/util/bmem.h:46
#3 obs_context_init_control libobs/obs.c.h:2795
#4 obs_source_init libobs/obs-source.c.h:244
#5 obs_source_create_internal libobs/obs-source.c.h:496
#6 obs_source_create_canvas libobs/obs-source.c.h:552
#8 obs_scene_create libobs/obs-scene.c.h:1546
Both tests keep a scene alive across obs_shutdown() on purpose. #2038 fixed the weak canvas refs in this case; the context control of the scene is still not freed.
What to do
Find who should free the control when a source outlives the core, and free it there. Then the two tests pass the leak check.
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
vpacher commentedon Nov 1, 2026
/ready
vpacher commentedon Nov 1, 2026
Claiming: free the context control of a scene alive at obs_shutdown
Plan (one PR, after #3290):
test_shutdown_*tests.bugentries from the known list.First PR: after #3290 merges.
vpacher commentedon Nov 1, 2026
Blocked: waiting on #3290
fix(libobs): RED: obs_shutdown() frees the control block of a source …
fix(libobs): GREEN: obs_shutdown() frees the control block of a sourc…
fix(libobs): obs_shutdown() frees the control block of a source left …