Skip to content

Check os_event_init in obs_module_load and ExecuteOnBrowser #4

Closed

Description

@rdoupe

Bug

Three os_event_init() callers in obs-browser ignore its result and then use the event:

  • obs_module_load() (two events);
  • BrowserSource::ExecuteOnBrowser(), where finishedEvent stays uninitialized if the init fails.

Since obs-rust/obs-studio#2163, a failed os_event_init() leaves the event pointer NULL instead of handing back a zeroed lock, so these callers would crash on the first wait or signal. The init doesn't fail on glibc with default attributes, so this is about failing cleanly under resource exhaustion. obs-rust/obs-studio#2188 fixes the same pattern in libobs and the in-tree plugins (obs-rust/obs-studio#2164); this is the part inside this submodule.

Plan

Check the result in each caller:

  • In obs_module_load(), fail the module load, or skip the feature that needs the event, as the surrounding code does for its other failures.
  • In ExecuteOnBrowser(), run without waiting, or return false, matching its contract.

Every successful path stays the same.

Activity

  1. zackees commented on Oct 25, 2026

    @zackees
    Member

    /ready

    Triage (coordinator): concrete scope (three named os_event_init() callers) and a plan. Acceptance, as read from the plan: each of the three callers checks the result; on failure obs_module_load() fails or skips the dependent feature like its other failure paths, and ExecuteOnBrowser() returns false without waiting; every successful path is unchanged; a RED test forces the init failure (as obs-rust/obs-studio#2188 does) and shows no crash. No blockers. P3 (only resource exhaustion reaches it), size:S.

  2. added
    P3
    size:S
    ready
    on Oct 25, 2026
  3. zackees commented on Oct 25, 2026

    @zackees
    Member

    Claiming: check os_event_init() in obs_module_load() and ExecuteOnBrowser()

    1. RED: a test under tests/ that forces os_event_init() to fail and shows the unchecked callers.
    2. GREEN: obs_module_load() returns false (destroying any event already made) if either init fails; ExecuteOnBrowser() returns without queueing or waiting if its init fails.
    3. Draft PR opens within the hour.
  4. self-assigned this
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3readysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions