WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 163766
bmalloc api should crash on failure to allocate when !isBmallocEnabled.
https://bugs.webkit.org/show_bug.cgi?id=163766
Summary
bmalloc api should crash on failure to allocate when !isBmallocEnabled.
Mark Lam
Reported
2016-10-20 16:43:51 PDT
Patch coming.
Attachments
proposed patch.
(2.11 KB, patch)
2016-10-20 16:55 PDT
,
Mark Lam
keith_miller
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2016-10-20 16:55:03 PDT
Created
attachment 292285
[details]
proposed patch.
Keith Miller
Comment 2
2016-10-20 17:00:23 PDT
Comment on
attachment 292285
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=292285&action=review
r=me with comments
> Source/bmalloc/bmalloc/Allocator.cpp:107 > + auto result = realloc(object, newSize);
nit: auto seems a little unnecessary here
> Source/bmalloc/bmalloc/Allocator.cpp:197 > + auto result = malloc(size);
nit: ditto
Filip Pizlo
Comment 3
2016-10-20 17:00:41 PDT
Comment on
attachment 292285
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=292285&action=review
R=me. I'm assuming that there's a reason why we need to crash.
> Source/bmalloc/ChangeLog:3 > + bmalloc api should crash on failure to allocate when GuardMalloc is used.
I recommend changing the title or adding a clarification that the crash-on-failure is for the !isBmallocEnabled case, which is broader than the GuardMalloc case.
Mark Lam
Comment 4
2016-10-20 17:19:37 PDT
Thanks for the review. I've changed the autos to void *s. I've also changed the title, and added a comment in the ChangeLog to explain why crashing in bmalloc is what we want when we fail to allocate. Landed in
r207646
: <
http://trac.webkit.org/r207646
>.
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