RESOLVED FIXED 26792
Override operator new/delete with const std::nothrow_t& as the second argument
https://bugs.webkit.org/show_bug.cgi?id=26792
Summary Override operator new/delete with const std::nothrow_t& as the second argument
Kwang Yul Seo
Reported 2009-06-29 02:12:09 PDT
On Windows CE, operator new/delete, new[]/delete[] with const std::nothrow_t& must be overrided because some standard template libraries use these operators. void *__cdecl operator new( size_t count, const std::nothrow_t& ) throw(); The problem occurs when memory allocated by new(size_t s, const std::nothrow_t&) is freed by delete(void* p). This causes the umatched malloc/free.
Attachments
Patch to override new/delete, new[]/delete[] with const std::nothrow_t& under Windows CE. (887 bytes, patch)
2009-06-29 02:13 PDT, Kwang Yul Seo
eric: review-
Patch to override new/delete, new[]/delete[] with const std::nothrow_t& under Windows CE. (2.00 KB, patch)
2009-06-30 01:48 PDT, Kwang Yul Seo
eric: review+
Kwang Yul Seo
Comment 1 2009-06-29 02:13:48 PDT
Created attachment 32001 [details] Patch to override new/delete, new[]/delete[] with const std::nothrow_t& under Windows CE.
Eric Seidel (no email)
Comment 2 2009-06-30 00:43:26 PDT
Comment on attachment 32001 [details] Patch to override new/delete, new[]/delete[] with const std::nothrow_t& under Windows CE. The spacing around throw() is not consistent in each line. Also, this is missing a ChangeLog: http://webkit.org/coding/contributing.html
Kwang Yul Seo
Comment 3 2009-06-30 01:48:58 PDT
Created attachment 32041 [details] Patch to override new/delete, new[]/delete[] with const std::nothrow_t& under Windows CE. Add a ChangeLog and make the coding style consistent.
Eric Seidel (no email)
Comment 4 2009-06-30 02:47:22 PDT
This change looks fine to me, but george should be aware of it.
George Staikos
Comment 5 2009-06-30 06:20:32 PDT
Where is a case of this actually happening?
George Staikos
Comment 6 2009-06-30 07:05:41 PDT
Note You need to log in before you can comment on or make changes to this bug.