Closed
Bug 1027815
Opened 11 years ago
Closed 7 years ago
access violation when using JS::CompileOptions in opt build
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1083464
People
(Reporter: soubok, Unassigned)
Details
I configured JS with the following options:
(apply patch bug-975011-patch (configure, build nsprpub for js/src standalone builds))
js/src/configure --enable-optimize=-Ox --enable-strip --with-windows-version=601 --enable-threadsafe --disable-gcgenerational --enable-exact-rooting --without-intl-api --enable-ctypes --disable-tests
Then I run the following code:
int main( int argc, char* argv[] ) {
JS_Init();
JSRuntime *rt = JS_NewRuntime( 32L * 1024L * 1024L );
JSContext *cx = JS_NewContext( rt, 8192 );
JS_BeginRequest( cx );
JS::CompileOptions co( cx );
JS_EndRequest( cx );
JS_DestroyContext( cx );
JS_DestroyRuntime( rt );
JS_ShutDown();
return 0;
}
The msvc2013 runtime error is:
A buffer overrun has occurred in foo.exe which has corrupted the program's internal state.
![]() |
||
Comment 1•11 years ago
|
||
The code that you ran... was it compiled with the same set of ifdefs as spidermonkey itself?
not sure, I just #include <jsapi.h> and use the default ones: WIN32 NDEBUG _CONSOLE _LIB
![]() |
||
Comment 3•11 years ago
|
||
OK. In a debugger, where exactly are you crashing?
The raw message is:
Unhandled exception at 0x752BCB49 in foo.exe: 0xC0000005: Access violation executing location 0x00000000.
The source code is unavailable (after the return 0;)
Note that the issue is solved by disabling "Whole Program Optimization" of my embedding.
Comment 6•8 years ago
|
||
I had a similar problem, but it was indeed caused by not having the same set of ifdefs; I had -DJS_DEBUG and -DJSGC_USE_EXACT_ROOTING, but not -DDEBUG. I think that's probably what's going on above.
Comment 7•8 years ago
|
||
I've come to think this is actually a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1083464
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•