Closed Bug 976325 Opened 6 years ago Closed 4 years ago

Fatal assert when firebug is installed due to with object on static scope chain

Categories

(Core :: JavaScript Engine, defect, critical)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox30 - ---

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [js:p1])

Build: Current nightly debug build

Steps to reproduce:
1)  Start the browser
2)  about:addons
3)  Click the "Get Add-Ons" option in the 5-item menu on the left
4)  Type "Firebug" in the filter field and hit enter
5)  Click the "Install" button for Firebug.

Expected results: Installs Firebug

Actual results:

Assertion failure: type() == BLOCK, at ../../../mozilla/js/src/vm/ScopeObject-inl.h:99
js::StaticScopeIter<(js::AllowGC)0>::block (this=0x7fff5fbcafd0) at ScopeObject-inl.h:99
99          JS_ASSERT(type() == BLOCK);
(gdb) p type()
$1 = js::StaticScopeIter<0>::WITH
(gdb) bt
#0  js::StaticScopeIter<(js::AllowGC)0>::block (this=0x7fff5fbcac90) at ScopeObject-inl.h:99
#1  0x0000000102b8adac in js::XDRScript<(js::XDRMode)0> (xdr=0x7fff5fbcb6e0, enclosingScope={<js::HandleBase<JSObject *>> = {<No data fields>}, ptr = 0x7fff5fbcb3d8}, enclosingScript={<js::HandleBase<JSScript *>> = {<No data fields>}, ptr = 0x7fff5fbcb580}, fun={<js::HandleBase<JSFunction *>> = {<No data fields>}, ptr = 0x7fff5fbcb070}, scriptp={<js::MutableHandleBase<JSScript *>> = {<No data fields>}, ptr = 0x7fff5fbcb048}) at jsscript.cpp:912
#2  0x0000000102a7c933 in js::XDRInterpretedFunction<(js::XDRMode)0> (xdr=0x7fff5fbcb6e0, enclosingScope={<js::HandleBase<JSObject *>> = {<No data fields>}, ptr = 0x7fff5fbcb3d8}, enclosingScript={<js::HandleBase<JSScript *>> = {<No data fields>}, ptr = 0x7fff5fbcb580}, objp={<js::MutableHandleBase<JSObject *>> = {<No data fields>}, ptr = 0x7fff5fbcb370}) at jsfun.cpp:448
#3  0x0000000102b8af31 in js::XDRScript<(js::XDRMode)0> (xdr=0x7fff5fbcb6e0, enclosingScope={<js::HandleBase<JSObject *>> = {<No data fields>}, ptr = 0x102dc6648}, enclosingScript={<js::HandleBase<JSScript *>> = {<No data fields>}, ptr = 0x102dc6648}, fun={<js::HandleBase<JSFunction *>> = {<No data fields>}, ptr = 0x102dc6648}, scriptp={<js::MutableHandleBase<JSScript *>> = {<No data fields>}, ptr = 0x7fff5fbcb6d0}) at jsscript.cpp:931
#4  0x0000000102d818dd in js::XDRState<(js::XDRMode)0>::codeScript (this=0x7fff5fbcb6e0, scriptp={<js::MutableHandleBase<JSScript *>> = {<No data fields>}, ptr = 0x7fff5fbcb6d0}) at Xdr.cpp:111
#5  0x0000000102a44a5a in JS_EncodeScript (cx=0x1131ec510, scriptArg={<js::HandleBase<JSScript *>> = {<No data fields>}, ptr = 0x7fff5fbcbbd0}, lengthp=0x7fff5fbcb7ac) at jsapi.cpp:6221
Needless to say, this makes debugging anything involving Firebug impossible.  :(
Severity: normal → critical
Oh, and the stack suggests the real issue here is just that XDR of any script using with() probably asserts.
Nicolas, is this related to your work on XDRScript in bug 946849 and bug 958172, or perhaps bug 973889?
Flags: needinfo?(nicolas.b.pierron)
Note that this is a regression from bug 966912.
I believe this is fixed by nbp's patch in bug 973889.
Depends on: 973889
Flags: needinfo?(nicolas.b.pierron)
Boris, Can you confirm the fix?
Flags: needinfo?(bzbarsky)
I have no idea, because installing Firebug doesn't work at all on current inbound tip.
Flags: needinfo?(bzbarsky)
Whiteboard: [js:p1]
(In reply to Andy Wingo [:wingo] from comment #5)
> I believe this is fixed by nbp's patch in bug 973889.

Have you been able to independently confirm this?
Can you confirm this is resolved?
Flags: needinfo?(nicolas.b.pierron)
(In reply to Benjamin Kerensa [:bkerensa] from comment #9)
> Can you confirm this is resolved?

I made a build based on mozilla central, and I was not able to see any crash after installing (STR comment 0) and playing with firebug.
I did not try to see if I was able to reproduce it before I landed Bug 973889.
Flags: needinfo?(nicolas.b.pierron)
Not going to track this based on feedback from Comment 10.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.