Closed Bug 1669613 Opened 4 years ago Closed 4 years ago

Call `audio_object_{add, remove}_property_listener` outside of `assert*!`

Categories

(Core :: Audio/Video: cubeb, defect, P1)

Desktop
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: chunmin, Assigned: chunmin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In create_blank_device_sync:

assert_eq!(
    audio_object_add_property_listener(
        kAudioObjectSystemObject,
        &address,
        devices_changed_callback,
        data_ptr as *mut c_void,
    ),
    NO_ERR
);

We call audio_object_add_property_listener and audio_object_remove_property_listener inside a assert_eq!, which may not be executed in optimized build. Hence, it may cause the data racing mentioned here.

Attached file GitHub Pull Request
Status: NEW → ASSIGNED
Depends on: 1669852

The patch is landed via bug 1669852.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: