[Webkit-unassigned] [Bug 205346] New: [GTK ] abort on memory allocation failure
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 17 10:31:47 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=205346
Bug ID: 205346
Summary: [GTK ] abort on memory allocation failure
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: contact+bugs.webkit.org at hacktivis.me
CC: bugs-noreply at webkitgtk.org
(In reply to Michael Catanzaro from bug 203956 comment #4)
> (In reply to Haelwenn (lanodan) Monnier from bug 203956 comment 203956#3)
> > IIRC I have -DUSE_SYSTEM_MALLOC=ON because otherwise would be very prone to
> > calling abort() (ouch! librairies shouldn't do that) when memory allocation
> > would fail with `vm.overcommit_memory = 2` (ended up going back to
> > `vm.overcommit_memory = 0`).
>
> Hm, nobody has reported this before.
>
> Memory allocation failure is fatal by necessity. Consider that WebKit
> depends on GLib, and g_malloc() crashes the application on allocation
> failure. (GLib's g_malloc() just wraps glibc's malloc with a check to see if
> allocation failed, and a crash if so.) So no library or application that
> uses GLib can avoid crash on allocation failure.
Well I guess it could use g_try_malloc() (which returns NULL on fail) instead to avoid the call to abort by GLib. Sadly IIRC it needs some large changes in WebKitGTK code so I don't think I'll be able to provide a patch as I don't have much time and basically no infra.
> I suppose it could be more likely to occur with bmalloc if bmalloc
> allocations memory in larger chunks than glibc does. If the difference is
> significant enough to encourage you to disable bmalloc, that would certainly
> be worth a separate bug report.
Done, moving directly to another ticket to avoid too much off-topic comments.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191217/eda2d203/attachment-0001.htm>
More information about the webkit-unassigned
mailing list