Closed Bug 472461 Opened 16 years ago Closed 16 years ago

TM: jsgc.cpp fails to compile with !JS_TRACER

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
blocker

Tracking

()

RESOLVED FIXED

People

(Reporter: igor, Assigned: igor)

References

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

The changes for bug 462021 broke single-threaded builds:

/home/igor/m/tm/js/src/jsgc.cpp: In function 'void* js_NewGCThing(JSContext*, uintN, size_t)':
/home/igor/m/tm/js/src/jsgc.cpp:1830: error: label 'testReservedObjects' used but not defined
The problem is not with !JS_THREADSAFE builds but rather with !JS_TRACER ones.
Summary: TM: jsgc.cpp fails to compile with !JS_THREADSAFE → TM: jsgc.cpp fails to compile with !JS_TRACER
Attached patch fix v1Splinter Review
Attachment #355733 - Flags: review?(jorendorff)
Version: Other Branch → Trunk
Severity: normal → blocker
With the patch I can compile on x86_64 linux (debug build), but FF crashes on
startup. Not sure if the crash has anything to do with this bug.
#0  GetGCThingFlags (thing=0xdadadadadadadada) at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/js/src/jsgc.cpp:1084
#1  0x00002aaaaad57774 in js_TraceTraceMonitor (trc=<value optimized out>, tm=0x7daa90)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/js/src/jsgc.cpp:3075
#2  0x00002aaaaad5916e in js_TraceRuntime (trc=0x7fff1e099810, allAtoms=0)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/js/src/jsgc.cpp:3108
#3  0x00002aaaaad5a386 in js_GC (cx=0xc5e730, gckind=GC_NORMAL)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/js/src/jsgc.cpp:3488
#4  0x00002aaab3c752dd in nsJSContext::ScriptEvaluated (this=0xc57810, aTerminated=1)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/dom/src/base/nsJSEnvironment.cpp:3313
#5  0x00002aaab3c7ce14 in nsJSContext::ExecuteScript (this=0xc57810, aScriptObject=0x1071980, aScopeObject=0xe15b80, 
    aRetValue=0x0, aIsUndefined=0x0) at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/dom/src/base/nsJSEnvironment.cpp:1759
#6  0x00002aaab3c53f11 in nsXULDocument::ExecuteScript (this=0xf25140, aScript=0x108e750)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/content/xul/document/src/nsXULDocument.cpp:3647
#7  0x00002aaab3c5d765 in nsXULDocument::OnStreamComplete (this=0xf25140, aLoader=0x10631c0, context=<value optimized out>, 
    aStatus=<value optimized out>, stringLen=3392, 
    string=0x121ec28 "/* ***** BEGIN LICENSE BLOCK *****\n * Version: MPL 1.1/GPL 2.0/LGPL 2.1\n *\n * The contents of this file are subject to the Mozilla Public License Version\n * 1.1 (the \"License\"); you may not use this f"...)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/content/xul/document/src/nsXULDocument.cpp:3515
#8  0x00002aaab0b80da8 in nsStreamLoader::OnStopRequest (this=0x10631c0, request=<value optimized out>, 
    ctxt=<value optimized out>, aStatus=0)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/netwerk/base/src/nsStreamLoader.cpp:108
#9  0x00002aaab12d74ec in nsJARChannel::OnStopRequest (this=0x125a4e0, req=<value optimized out>, ctx=<value optimized out>, 
    status=0) at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/modules/libjar/nsJARChannel.cpp:841
#10 0x00002aaab0b607b5 in nsInputStreamPump::OnStateStop (this=0x1252ee0)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/netwerk/base/src/nsInputStreamPump.cpp:576
#11 0x00002aaab0b60e13 in nsInputStreamPump::OnInputStreamReady (this=0x1252ee0, stream=0x7daa90)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/netwerk/base/src/nsInputStreamPump.cpp:401
#12 0x00002aaaab2618e0 in nsInputStreamReadyEvent::Run (this=0x0)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/xpcom/io/nsStreamUtils.cpp:111
#13 0x00002aaaab27d9d5 in nsThread::ProcessNextEvent (this=0x65b1c0, mayWait=1, result=0x7fff1e099bbc)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/xpcom/threads/nsThread.cpp:510
#14 0x00002aaaab23b4c3 in NS_ProcessNextEvent_P (thread=0xdadadadadadadada, mayWait=1) at nsThreadUtils.cpp:230
#15 0x00002aaab17481fa in nsBaseAppShell::Run (this=0x75fa10)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/widget/src/xpwidgets/nsBaseAppShell.cpp:170
#16 0x00002aaab26d5821 in nsAppStartup::Run (this=0x7b9140)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/toolkit/components/startup/src/nsAppStartup.cpp:192
#17 0x00002aaaaaae9f89 in XRE_main (argc=<value optimized out>, argv=<value optimized out>, aAppData=<value optimized out>)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/toolkit/xre/nsAppRunner.cpp:3203
#18 0x0000000000400eca in main (argc=3, argv=0x0)
    at /home/smaug/mozilla/mozilla_cvs/hg/mozilla/browser/app/nsBrowserApp.cpp:156
Comment on attachment 355733 [details] [diff] [review]
fix v1

Thanks for fixing my thinkos.  Please remove the /* JS_TRACER */ comment though.  The prevailing style seems to be to comment #endifs only when the matching #if is far away or camouflaged by other cpp junk.
Attachment #355733 - Flags: review?(jorendorff) → review+
Jason, I know you're not technically a peer, but if you could review this so we can land both of these on m-c to get it green again, I can get ex-post-facto review from Igor/Crowder.
Attachment #355979 - Flags: review?(jorendorff)
Attachment #355979 - Flags: review?(igor)
Comment on attachment 355979 [details] [diff] [review]
ifdef away even more of tracing (applies on top of the first patch), rev. 1

Yes, absolutely.
Attachment #355979 - Flags: review?(jorendorff) → review+
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/rev/7a3b82cd9ee6
http://hg.mozilla.org/mozilla-central/rev/c227e9c0e264

Somebody's going to need to merge this back to TM.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #5)
> Jason, I know you're not technically a peer,

Hello, Jason is a peer and has been (no legalistic exclusions for us in JS module land -- just delay/forgetfulness on my part and no CVS access for him, but in the end I made him cvsuser in despot as well as webmonkey).

/be
Flags: in-testsuite-
Flags: in-litmus-
Comment on attachment 355979 [details] [diff] [review]
ifdef away even more of tracing (applies on top of the first patch), rev. 1

Adding forgotten r+
Attachment #355979 - Flags: review?(igor) → review+
Bug 462021 has now landed on 1.9.1 and seems to have brought this problem with it; at least I am seeing this error message now.  Any plans to bring this patch across too?
Yep
Flags: blocking1.9.1+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: