-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libobs/util: Crash on bmalloc(0) #11181
base: master
Are you sure you want to change the base?
Conversation
this is typically reported in pipewire captures, can we fix that first? |
To clarify, the "please fix your code! This will crash in future versions of OBS" message currently appears in normal operation using pipewire? That arguably should have been fixed during the last two years, so yes that should be fixed; but in my opinion it shouldn't necessarily hold up this PR - the apparent evidence from the last two years would suggest that it could take ages (seeing that "this will crash in future versions" isn't enough motivation). |
obs-studio/plugins/linux-pipewire/pipewire.c Lines 396 to 397 in 60a45d3
|
I guess the question is whether or not |
Even if it is expected to be zero at times then it needs to be checked and an allocation only take place if is has a As |
My question was poorly phrased. It should have been "should we actually be calling While I welcome a change to |
ea568a3
to
a1abf08
Compare
As outlined in c5965c8, bmalloc(0) is pretty much always a mistake, possibly hiding other bugs. It's been two years since that commit introduced a warning announcing that this will crash in a future version of OBS, let's make that happen.
a1abf08
to
ba497df
Compare
Description
As outlined in c5965c8 (#6721),
bmalloc(0)
is pretty much always a mistake, possibly hiding other bugs. It's been two years since that commit introduced a warning announcing that this will crash in a future version of OBS, let's make that happen.cc @notr1ch
Motivation and Context
People are breaking stuff (see other PRs), let's break everything at once.
This gives plugin developers who might (unknowingly) do this the opportunity to fix it.
If there are places where we're doing it in OBS itself, this is a great (and certainly loud) way to find out.
How Has This Been Tested?
macOS 15
Launched OBS and played around, did not observe crashes.
Manually added a
malloc(0)
call, had OBS crash as expected.Types of changes
Checklist: