[Webkit-unassigned] [Bug 72017] [EFL] Add NULL checks after memory allocation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 14 07:35:18 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72017





--- Comment #3 from Grzegorz <g.czajkowski at samsung.com>  2011-11-14 07:35:18 PST ---
(In reply to comment #2)
> (From update of attachment 114478 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114478&action=review
> 
> > Source/WebCore/platform/efl/ScrollbarEfl.cpp:160
> > +    Edje_Message_Float_Set* message = static_cast<Edje_Message_Float_Set*>
> > +        (alloca(sizeof(Edje_Message_Float_Set) + sizeof(float)));
> 
> I'm not a big fan of alloca myself, as it is not very portable. Now that you're on this part of the code, it'd be good to replace it with new+delete or a smart pointer.

Yes, you're right. As I know all new/delete and malloc/free calls will be replaced in one patch so it would be better to use new+delete here instead of alloca.

> 
> > Source/WebKit/efl/ewk/ewk_cookies.cpp:104
> > +        } else
> > +            CRITICAL("Could not allocate Ewk_Cookie.");
> 
> Has this happened in your daily usage? I'm asking because every once in a while patches checking for memory allocations are sent and most of the time they are rejected for the same reason (there's not much point in checking for every allocation failure across WebKit/WebCore).

No, it hasn't. But generally WebKit-EFL checks the most of allocation failure. And some patches have already been landed, for example
https://bugs.webkit.org/show_bug.cgi?id=64932
https://bugs.webkit.org/show_bug.cgi?id=65853

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list