Re: How to create multiple contexts in different threads?

Clément Vuchener <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On Tuesday, March 29, 2016 at 8:48:32 PM UTC+2, Jason Orendorff wrote:
> On Tue, Mar 29, 2016 at 4:16 AM, Clément Vuchener <
> [email protected]> wrote:
> 
> > > OK. Does this happen when you call JS_NewRuntime, or later? Can you get a
> > > stack trace?
> >
> > It happens in JS_NewRuntime. There may actually be different assertion
> > depending on some race.
> >
> 
> This is good information.
> 
> I'm at a loss. If I were investigating this locally, I would start by
> printing the value of lockOwner and PR_GetCurrentThread() in the relevant
> places. The initial goal is to figure out if the bug is in SM or NSPR. (You
> can do this with GDB rather than messing with the code and recompiling, but
> I guess it's a bit of a pain either way.)
> 
> How are you building SpiderMonkey and your app? Can you post the configure
> command line?

I am using the command line from the documentation: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation with a prefix added.
../configure --enable-debug --disable-optimize --prefix=$HOME/opt/mozjs-38.2.1.rc0-debug

I also tried cloning the mozilla-esr38 repo and I have same problem.

For my application, I am using cmake 3.x with the pkg-config module.
$ PKG_CONFIG_PATH=$HOME/opt/mozjs-38.2.1.rc0-debug/lib/pkgconfig/ pkg-config --cflags --libs js
-include /home/clement/opt/mozjs-38.2.1.rc0-debug/include/mozjs-/js/RequiredDefines.h -I/home/clement/opt/mozjs-38.2.1.rc0-debug/include/mozjs- -I/usr/include/nspr4 -L/home/clement/opt/mozjs-38.2.1.rc0-debug/lib -lmozjs- 
Is there anything wrong?

> Does configuring with --enable-posix-nspr-emulation make it go away?

No.

> 
> At this point, it could still be just about anything, but wild guesses
> include:
> - enabling exceptions in the app, and not in SpiderMonkey, might mess up
> the ABI somehow;
> - there could be some NSPR or SM header-vs-runtime version mismatch;
> - maybe DEBUG is #defined when compiling some SM source files but not
> others, perhaps due to a build system bug when building with unusual options
> 
> -j
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.