Re: Crash with mozjs-76 on Linux in _dl_runtime_resolve() / dl_fixup() as soon as program starts

Steve Fink <[email protected]> Wed, 20 May 2020 08:28:04 -0700
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On 5/20/20 6:06 AM, Nathan Froyd wrote:
> On Tue, May 19, 2020 at 12:25 PM Miles <[email protected]> wrote:
>
>> #0  0x000000393100e02c in _dl_fixup () from /lib64/ld-linux-x86-64.so.2
>> #1  0x0000003931014725 in _dl_runtime_resolve () from
>> /lib64/ld-linux-x86-64.so.2
>> #2  0x00007ffff570465e in js::MutexImpl::MutexImpl() ()
>>      at /spidermonkey/tmp/mozjs-76.0.0/js/src/threading/Mutex.h:39
>>
> This is crashing at
> https://searchfox.org/mozilla-central/rev/61fceb7c0729773f544a9656f474e36cd636e5ea/js/src/threading/Mutex.h#39
> which is a function that lives in mozglue:
>
> https://searchfox.org/mozilla-central/source/mozglue/misc/PlatformMutex.h#29
>
> and your linker is telling you it can't find the symbol.  It looks like you
> didn't link mozglue in anywhere?  (Not really sure how mozglue works with
> standalone SpiderMonkey...)

This is <https://bugzilla.mozilla.org/show_bug.cgi?id=1465038>. The 
usual fix is to compile mozjs with --disable-jemalloc, which really 
should be the default when building for embedding.