[Webkit-unassigned] [Bug 45794] [BREWMP] Don't use new in static initializers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 15 00:06:24 PDT 2010


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





--- Comment #3 from Kwang Yul Seo <kwangyul.seo at gmail.com>  2010-09-15 00:06:24 PST ---
(In reply to comment #2)
> I don't understand how this changes things.

1) static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>);

allocates the HashSet memory in the heap.


2) static HashSet<Structure*> ignoreSet;

allocates the HashSet memory in the data section.


BMP heap is not yet initialized at C++ static initialization time. So it is illegal to call new (which eventually calls Brew MP's MALLOC) in static initializers.

2) never calls MALLOC. So it is okay.

-- 
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