Closed Bug 958940 Opened 6 years ago Closed 6 years ago

SpiderMonkey (mozjs-24.2.0) build failure on Linux/PA-RISC

Categories

(Core :: JavaScript Engine, defect)

HP
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox30 --- wontfix
firefox31 --- fixed
firefox-esr24 --- wontfix

People

(Reporter: aaro.koskinen, Assigned: aaro.koskinen)

References

Details

(Whiteboard: [qa-])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20131215 Firefox/24.0 Iceweasel/24.2.0 (Nightly/Aurora)
Build ID: 20131215160340

Steps to reproduce:

mozjs-24.2.0 compilation on Linux/PA-RISC with GCC 4.8.2 and GLIBC 2.18.


Actual results:

Two files fail to build:

/work/parisc/mozjs-24.2.0/js/src/gc/RootMarking.cpp: In function 'void MarkConservativeStackRoots(JSTracer*, bool)':
/work/parisc/mozjs-24.2.0/js/src/gc/RootMarking.cpp:323:14: error: invalid conversion from 'uintptr_t {aka unsigned int}' to 'uintptr_t* {aka unsigned int*}' [-fpermissive]
     stackMin = rt->nativeStackBase;
              ^
make[4]: *** [RootMarking.o] Error 1

/work/parisc/mozjs-24.2.0/js/src/jsapi.cpp: In constructor 'JSRuntime::JSRuntime(JSUseHelperThreads)':
/work/parisc/mozjs-24.2.0/js/src/jsapi.cpp:868:5: error: 'nativeStackLimit' was not declared in this scope
     nativeStackLimit = UINTPTR_MAX;
     ^
make[4]: *** [jsapi.o] Error 1



Expected results:

Build should be successful.
Hardware: x86 → HP
Workaround patch #1.
Workaround patch #2.
See Also: → 958941
Comment on attachment 8358933 [details] [diff] [review]
0001-mozjs-parisc-workaround.patch

nbp: You were reviewing the MIPS JIT patches. Are you an appropriate reviewer for these patches to fix the PA-RISC build?
Attachment #8358933 - Flags: review?(nicolas.b.pierron)
Attachment #8358934 - Flags: review?(nicolas.b.pierron)
Attachment #8358934 - Flags: review?(nicolas.b.pierron) → review+
Attachment #8358933 - Flags: review?(nicolas.b.pierron) → review+
Thanks for these contributions :)

I guess you are not enabling any JIT yet, because they are not thought at all with the idea of stack growing upward.

Terrence might have more ideas if there is any expectation from the GC point of view.  I would not expect that non-conservative GC would be dependent on the stack order, but I do not know.

Are you maintaining Firefox for a Linux distribution which works on PA-RISC?
Flags: needinfo?(terrence)
I landed the two patches as one commit:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb0b6f2f3ca9
Assignee: nobody → aaro.koskinen
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Code for conservative scanning of an upward growing stack has existed since I've been hacking on the GC. As far as I know it is /totally untested/ and I am *highly sceptical* that it will work at all. The only reason I didn't rip it out years ago was so that it could serve as a placeholder for whoever has to rewrite it.

Please test thoroughly. In particular you would be well served using the JS_GC_ZEAL environment variable. Use |JS_GC_ZEAL=help ./path/to/js| to get a list of options.
Flags: needinfo?(terrence)
https://hg.mozilla.org/mozilla-central/rev/e43020f1f491
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.