Closed
Bug 511568
Opened 16 years ago
Closed 16 years ago
CE shunt not overriding std::nothrow operator new
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: vlad, Assigned: vlad)
Details
(Whiteboard: [nv])
Attachments
(1 file, 1 obsolete file)
2.71 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
The shunt is missing overrides of the std::nothrow variants of operator new, causing problems when it's used; we don't use it a lot, but we do in canvas, where we were ending up using the system allocator but calling jemalloc's delete.
This patch overrides std::nothrow variants of operator new. It also makes the C++ new/delete operators all inline, which saves us an extra function call; it means that we don't export these symbols from mozce_shunt though, but that seems to be fine.
Flags: blocking1.9.2+
Attachment #395480 -
Flags: review?(bugmail)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [nv]
Assignee | ||
Comment 1•16 years ago
|
||
Better patch, now going back to exporting as well as inlining.
The trick seemed to be to use inline instead of __forceinline, and to not try to export the placement new operators (but still define them inline), since they're essentially noops.
Also using declspec(dllimport) or dllexport didn't work -- compiler complained about changing the linkage of a built-in function declaration.
Attachment #395480 -
Attachment is obsolete: true
Attachment #395503 -
Flags: review?(bugmail)
Attachment #395480 -
Flags: review?(bugmail)
Updated•16 years ago
|
Attachment #395503 -
Flags: review?(bugmail) → review+
Comment 2•16 years ago
|
||
Comment on attachment 395503 [details] [diff] [review]
better patch
>+#include <stdlib.h>
use jemalloc.h directly
>+// actually throw for us. Note that these are inline, so they
>+// are not exported from the shunt.
fix comment (as you pointed out on irc)
>+;; operator new[] nothrow
>+??_U@YAPAXIABUnothrow_t@std@@@Z
> ;; operator delete[]
> ??_V@YAXPAX@Z
>+
> malloc
nit, don't need the extra space
Assignee | ||
Comment 3•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9230b5d26c85
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/3fe9b88d09c9
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
status1.9.2:
--- → beta1-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•