WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
185762
[GTK] Initialize bmalloc only when needed
https://bugs.webkit.org/show_bug.cgi?id=185762
Summary
[GTK] Initialize bmalloc only when needed
Milan Crha
Reported
2018-05-18 03:18:23 PDT
Would it be possible to initialize bmalloc only when it is really needed, please? It's currently enough to preload WebKitGTK+ library and there's that bmalloc thread which has also some side effects, like the Gigacage allocations and so on. The Gigacage causes problems in various scenarios, when it crashes instead of fail gracefully and let the process run. (Like
bug #183329
and downstream bug
https://bugzilla.redhat.com/show_bug.cgi?id=1564970
). You can test it with such a simple program like this: --------------------------------------- #include <stdio.h> #include <stdlib.h> int main (void) { system ("sleep 30"); return 0; } --------------------------------------- Compile it with: $ gcc simple.c -o simple -g Then run it as: $ ./simple and see its backtrace: $ gdb --batch --ex "t a a bt" -pid=`pidof simple` which shows only a single thread and nothing else. Run it as this: $ LD_PRELOAD=/usr/lib64/libwebkit2gtk-4.0.so ./simple and the backtrace will show also the bmalloc thread, even there's not called any single method from the webkit library.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2022-04-08 13:04:19 PDT
bmalloc is always needed, sorry.
Michael Catanzaro
Comment 2
2022-04-08 13:05:38 PDT
> int main (void) >{ > system ("sleep 30"); > return 0; >}
Um, I didn't read. As usual. Sorry. ;)
Milan Crha
Comment 3
2022-04-10 09:07:38 PDT
Yeah, it was meant as "initialize on demand, not on library load". Feel free to close this, though. This is just about "nice to have", but if it would mean any unnecessary complexity of the code, then it does not worth it, I believe.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug