Hi Stephan; On Thu, Feb 18, 2010 at 5:30 PM, Stephan Assmus <supersti...@gmx.de> wrote:
> Hi, > > On 2010-02-18 at 15:59:35 [+0100], İsmail Dönmez <ism...@namtrac.org> > wrote: > > Picking up and old thread I know... > > > > On Wed, Jan 13, 2010 at 7:19 PM, Darin Adler <da...@apple.com> wrote: > > > > > Yong Li also asked about standard library functions calling new and > > > delete, > > > specifically STL. I believe we have been avoiding calling these > functions > > > in > > > WebKit, but I may be mistaken. > > > > > > > Recently I came across some memory corruption issues and turns out that > > WebKit uses std::stable_sort which uses the operator new(nothrow) . I am > not > > sure if there is a useful replacement but its good to know about this. > > Can you elaborate on this? Were these the cause for your memory corruption? > If yes, where and how did you solve it? > > For my own WinCE port I override new & delete globally via a special memory pool. I override all 8 signatures of new & delete so its supposed to work fine. But... std::stable_sort calls operator new(nothrow) which somehow does not pick up my replacement but it does use my delete replacement. So I end up deleting memory I didn't allocate which as expected crashes. I am still debugging why STL would not use my replacement function, but meanwhile beware about this :-) Regards, İsmail
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev