Closed
Bug 1417135
Opened 7 years ago
Closed 6 years ago
[MIPS] js shell fails when built with --with-jemalloc
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: dragan.mladjenovic, Assigned: dragan.mladjenovic)
Details
Attachments
(1 file, 1 obsolete file)
714 bytes,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Steps to reproduce: Tried to build js shell: cd $BUILD_DIR ../configure --enable-debug --disable-optimize --target=mipsel-linux-gnu --without-intl-api --with-jemalloc make ./dist/bin/js Actual results: Assertion failure: Storage<T>::initialized(), at $BUILD_DIR/dist/include/mozilla/ThreadLocal.h:225 Segmentation fault Expected results: js shell promt
Assignee | ||
Comment 1•7 years ago
|
||
Since Bug 528687 mips builds without HAVE_THREAD_TLS_KEYWORD and uses ThreadLocalKeyStorage as tls storage policy. The tls variable that asserts is jemalloc's thread_arena (https://searchfox.org/mozilla-central/source/memory/build/mozjemalloc.cpp#1221) When run on mips the following initialization sequence occurs: (libstdc++.so init -> call into malloc(size_t) -> malloc_init() -> thread_arena.init(); static constructors in js shell - > ThreadLocalKeyStorage::ThreadLocalKeyStorage() for thread_arena. ThreadLocalKeyStorage constructor runs after the thread_arena variable has already been "initalized" as part of malloc_init clearing its state back to zero introducing failure when malloc is called later. This patch removes user-defined constructor leaving thread_arena to be zero initialized w/o static initializer.
Assignee | ||
Updated•7 years ago
|
Component: JavaScript Engine → MFBT
Comment 2•7 years ago
|
||
Comment on attachment 8928229 [details] [diff] [review] bug1417135.diff Review of attachment 8928229 [details] [diff] [review]: ----------------------------------------------------------------- ::: mfbt/ThreadLocal.h @@ -131,5 @@ > template<typename T> > class ThreadLocalKeyStorage > { > public: > - ThreadLocalKeyStorage() It would be better to keep it but make it constexpr, it should have the same effect.
Assignee | ||
Comment 3•7 years ago
|
||
Marked the constructor as constexpr as per suggestion.
Attachment #8928229 -
Attachment is obsolete: true
Attachment #8928455 -
Flags: review?(mh+mozilla)
Updated•7 years ago
|
Attachment #8928455 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•7 years ago
|
Mentor: dragan.mladjenovic
Assignee | ||
Updated•7 years ago
|
Mentor: dragan.mladjenovic
Updated•6 years ago
|
Assignee: nobody → dragan.mladjenovic
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4b598561eae5 Mark user-defined default constructor for ThreadLocalKeyStorage as constexpr. r=glandium
Keywords: checkin-needed
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4b598561eae5
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•