Skip to content

Bug 2074412 - Update to ringbuf 0.5.2 - #286

Merged
kinetiknz merged 2 commits into
mozilla:trailblazerfrom
badboy:ringbuf-update
Sep 22, 2026
Merged

kinetiknz merged 2 commits into
mozilla:trailblazerfrom
badboy:ringbuf-update

Conversation

@badboy

@badboy badboy commented Sep 22, 2026

Copy link
Copy Markdown
Member

Mechanical translation to the newer trait methods.


Similar to mozilla/cubeb-pulse-rs#115
I don't know if this is all actually correct.
Tests look unchanged

I have two tests not working on the default branch:

backend::tests::api::test_get_channel_count_of_input_for_a_output_only_deivce
backend::tests::api::test_set_buffer_size_sync

they still don't work with this patch.

Mechanical translation to the newer trait methods.
@badboy

badboy commented Sep 22, 2026

Copy link
Copy Markdown
Member Author
thread '<unnamed>' (34480) panicked at src/backend/mod.rs:3264:13:
can't push to ringbuf
stack backtrace:
   0: std::panicking::begin_panic::<&str>
             at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/std/src/panicking.rs:751:5
   1: <cubeb_coreaudio::backend::InputCallbackLogger>::push
             at ./src/backend/mod.rs:3264:13
   2: cubeb_coreaudio::backend::audiounit_input_callback::{closure#0}
             at ./src/backend/mod.rs:656:18
   3: cubeb_coreaudio::backend::audiounit_input_callback
             at ./src/backend/mod.rs:706:9
   4: _AUGenericOutputFactory
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: __pthread_joiner_wake
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

well, I guess I was wrong.

@kinetiknz kinetiknz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread src/backend/mod.rs Outdated

fn push(&mut self, data: InputCallbackData) {
self.prod.push(data);
if self.prod.try_push(data).is_err() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

push was fallible in ringbuf 0.2, so switching to try_push here without panicking is sufficient.

@kinetiknz
kinetiknz merged commit 4b6a206 into mozilla:trailblazer Sep 22, 2026
2 of 3 checks passed
@larseggert

Copy link
Copy Markdown
Contributor

0.5.2 had some soundness issues that were fixed in 0.5.3. I don't think this crate or Gecko were affected, but better to update. (We can then also drop the cargo audit suppression for Gecko.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants