Skip to content

multiqueue: fix potential crash on shutdown

The mq we get out of the weak ref might be NULL if we're shutting down, which could cause assertion failures or crashes.

It might also cause miscompilations where the compiler just optimises away the NULL check because it jumps to a code path that then dereferences the pointer which clearly isn't going to work. Seems like something like this happens with gcc 11.

Co-authored by: Doug Nazar nazard@nazar.ca Co-authored by: Sebastian Dröge sebastian@centricular.com

Merge request reports