IPDL unit tests segfault on startup [ @CheckArg] nsAppRunner.cpp:476

RESOLVED FIXED

Status

()

Core
IPC
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: cjones, Assigned: cjones)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(gdb) bt
#0  0x00007ffff429797d in CheckArg (aArg=0x7ffff5f1cf73 "omnijar", aCheckOSInt=0, aParam=0x7fffffffe518, aRemArg=1) at /home/cjones/mozilla/mozilla-central/toolkit/xre/nsAppRunner.cpp:476
#1  0x00007ffff42a200a in XRE_InitCommandLine (aArgc=1, aArgv=0x7fffffffe7a8) at /home/cjones/mozilla/mozilla-central/toolkit/xre/nsAppRunner.cpp:3800
#2  0x00007ffff42b10a0 in XRE_InitParentProcess (aArgc=1, aArgv=0x7fffffffe7a8, aMainFunction=0x7ffff592bbf6 <mozilla::_ipdltest::IPDLUnitTestMain(void*)>, aMainFunctionData=0x7fffffffea77) at /home/cjones/mozilla/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:495
#3  0x00007ffff42b13ab in XRE_RunIPDLTest (aArgc=1, aArgv=0x7fffffffe7a8) at /home/cjones/mozilla/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:542
#4  0x00000000004006e1 in main (argc=2, argv=0x7fffffffe7a8) at /home/cjones/mozilla/mozilla-central/ipc/ipdl/test/cxx/app/TestIPDL.cpp:51

Looks pretty straightforward --- the omnijar check wants gArgv, but it's not initialized yet in this startup path.
Created attachment 467505 [details] [diff] [review]
Initialize gArgc/v earlier in XRE_InitParentProcess()
Assignee: nobody → jones.chris.g
Attachment #467505 - Flags: review?(bent.mozilla)
Attachment #467505 - Flags: review?(bent.mozilla) → review+
Comment on attachment 467505 [details] [diff] [review]
Initialize gArgc/v earlier in XRE_InitParentProcess()

I want this so I can run IPDL C++ tests on projects/cedar, and maybe look at re-enabling them on e10s and enabling them on m-c.  AFAIK InitParentProcess is only used by ipdlunittest-bin currently.
Attachment #467505 - Flags: approval2.0?
Approval ping.
Comment on attachment 467505 [details] [diff] [review]
Initialize gArgc/v earlier in XRE_InitParentProcess()

Looked again, and XRE_InitParent() is indeed only used by IPDL unit tests.  Will push a=test-only.
Attachment #467505 - Flags: approval2.0?
http://hg.mozilla.org/projects/cedar/rev/25d5ad23773c
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.