[webkit-reviews] review granted: [Bug 34569] Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0 : [Attachment 48210] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 5 01:30:42 PST 2010


Alexey Proskuryakov <ap at webkit.org> has granted Kwang Yul Seo
<kwangyul.seo at gmail.com>'s request for review:
Bug 34569: Don't call CRASH() in fastMalloc and fastCalloc when the requested
memory size is 0
https://bugs.webkit.org/show_bug.cgi?id=34569

Attachment 48210: Patch
https://bugs.webkit.org/attachment.cgi?id=48210&action=review

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
I now see what you're saying - there's already a branch for null result, so you
are not adding one.

+	 // malloc(0) can return 0 in some systems.
+	 // To make sure that fastMalloc never returns 0,
+	 // retry with fastMalloc(1).

Saying "in some systems" can be confusing. I'd say "Behavior of malloc(0) is
implementation defined". Also, these lines are extremely short, there is no
need to wrap comments like this.

r=me. Someone can fix these when landing, or you could submit a corrected patch
for commit queue.


More information about the webkit-reviews mailing list