Closed Bug 816250 Opened 12 years ago Closed 12 years ago

Fix 32-bit --disable-methodjit builds after a recent jsscript.h commit

Categories

(Core :: JavaScript Engine, defect)

PowerPC
OpenBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20
Tracking Status
firefox17 --- unaffected
firefox18 --- unaffected
firefox19 --- fixed
firefox20 --- fixed

People

(Reporter: gaston, Assigned: n.nethercote)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #786588 +++

A recent commit to jsscript changed the struct size, thus breaking (*AGAIN* :) --disable-methodjit (ie, powerpc in my case) builds :

src/mozilla-central/js/src/jsscript.h:931:1: error: size of array 'moz_static_assert96' is negative

src/mozilla-aurora/js/src/jsscript.h:931:1: error: size of array 'moz_static_assert96' is negative

m-c on the 4/11 was fine, and it's now in aurora - so it's likely a jsscript modification between the 4/11 and the last uplift that broke it.
Depends on: 754641
Readding the !MJ&&32bits pad32 fixes the issue for me, that patch applies to both m-c and m-a, currently building here. I've tested that this produces a working js shell both with m-c and m-a. Will report tomorrow is this also produces a working firefox for both branches.

While here, added a big scary comment to remind ppl to test --disable-methodjit on 32 bits archs when touching the JSScript struct layout. I can amend that of course.

Given that on the 4/11 i had built m-c fine, it got broken after that date. Looking at the jsscript.h hg log, i'd be tempted to blame bug 781602 which removed the 32-bit only padding and added the parallelIon struct member. That's probably the commit that changed the layout of the struct, thus breaking !JS_METHODJIT.
Assignee: general → landry
Attachment #690083 - Flags: review?(n.nethercote)
Depends on: 781602
Firefox is broken at runtime (xpcshell crashes during package) on OpenBSD/ppc on all branches, but i'm pretty sure that's an unrelated issue. The build fix itself remains needed.
Here's an alternative approach that will be much harder to break.  The
disadvantage is that on non-JM, non-IM and non-JM-or-IM builds (which are
rare) JSScript might be a slightly bigger than necessary.

Landry, what do you think?
Assignee: landry → n.nethercote
Attachment #690083 - Flags: review?(n.nethercote)
Attachment #690674 - Flags: feedback?(landry)
Comment on attachment 690674 [details] [diff] [review]
Make it harder to break the JSScript size constraints.

Yes, that also works for me. That's an alternative i've been considering too.... and it would make much more sense that always fiddle with padding each times the struct changes.
Attachment #690674 - Flags: feedback?(landry) → feedback+
Attachment #690674 - Flags: review?(luke)
Comment on attachment 690674 [details] [diff] [review]
Make it harder to break the JSScript size constraints.

Smart!
Attachment #690674 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/dd214d4f8e98
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment on attachment 690674 [details] [diff] [review]
Make it harder to break the JSScript size constraints.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 781602 ?
User impact if declined: build failure on non-methodjit archs (say, powerpc)
Testing completed (on m-c, etc.): in progress, working here
Risk to taking this patch (and alternatives if risky): none
String or UUID changes made by this patch: none
Attachment #690674 - Flags: approval-mozilla-aurora?
Comment on attachment 690674 [details] [diff] [review]
Make it harder to break the JSScript size constraints.

Approving on Aurora as its a low risk patch and avoids build failures on non-methodjit arch.
Attachment #690674 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: