Closed
Bug 481673
Opened 15 years ago
Closed 15 years ago
JS_Assert is C++-name-mangled in non-DEBUG builds
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
918 bytes,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
The extern "C" declaration in jsutil.h is DEBUG-only, but the function is (intentionally) always defined regardless of DEBUG. As a result, applications built DEBUG will not link against a non-DEBUG SpiderMonkey.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Comment 2•15 years ago
|
||
Wes points out that one problem DEBUG applications will have calling a non-DEBUG SM is that JSTracer's size depends on #ifdef DEBUG. We could just remove that #ifdef and JSTracer would sometimes have a few useless fields; it should not hurt performance. Or maybe refusing to link in this case is a feature, not a bug. But I'm not quite prepared to admit that yet. Brendan?
Comment 3•15 years ago
|
||
This bug's an easy fix. The JSTracer struct size varying with DEBUG is a bug, should have caught that years ago when it went in. Igor, you agree? /be
Comment 4•15 years ago
|
||
Wes may not run into this, but IIRC on Windows, at least with the standard debug and release CRTs, you can't mix DEBUG and NDEBUG code compiled and packaged into libraries safely. Benjamin knows all. /be
Updated•15 years ago
|
Attachment #365679 -
Flags: review?(brendan) → review+
Updated•15 years ago
|
Flags: wanted1.9.1?
Updated•15 years ago
|
Flags: wanted1.9.1? → wanted1.9.1+
Comment 5•15 years ago
|
||
You can, as long as you don't mismatch allocators or pass FILE* across the boundaries. I think JS should be safe in that regard.
Comment 6•15 years ago
|
||
Mismatched allocators is all too easy, since SpiderMonkey was designed for one true malloc and allows JS_malloc | free and malloc | JS_free. /be
Comment 7•15 years ago
|
||
FWIW: I was hit by this problem and discussed it with Wes and to some extent Jorendorff on IRC. The patch by Jorendorff solves our problems; compiles and passes all our tests. Thanks a bunch.
Assignee | ||
Comment 8•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/87a4c653c637
Whiteboard: fixed-in-tracemonkey
Comment 9•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/87a4c653c637
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: in-testsuite-
Comment 10•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/c64179d6d1e2
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•