Open Bug 1046985 Opened 6 years ago Updated 3 years ago

Crash in XPCShell (xul.dll) when packaging after building 31ESR with VS2012

Categories

(Core :: XPCOM, defect)

31 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: mark, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.7) Gecko/20140725 Firefox/24.7 PaleMoon/24.7.0 (Nightly/Aurora)
Build ID: 20140725125805

Steps to reproduce:

1. Set up a build environment with VS2012
2. Make a .mozconfig to use containing optimizations: --enable-optimize="-O2 -GFLTs"
3. Build Thunderbird 31ESR using ./mozilla/mach build
4. Try to package with ./mozilla/mach package


Actual results:

XPCShell crashes:
@XPCConvert::NativeData2JS(JS::MutableHandle<JS::Value>, const void *, const nsXPTType &, const nsID *, tag_nsresult *)
Unhandled exception at 0x5974D6C6 (xul.dll) in xpcshell.exe: 0xC0000005: Access violation reading location 0x00247000.

Call stack from the VS2012 debugger:
>	xul.dll!XPCConvert::NativeData2JS(JS::MutableHandle<JS::Value> d, const void * s, const nsXPTType & type, const nsID * iid, tag_nsresult * pErr) Line 108	C++
 	xul.dll!XPCConvert::NativeArray2JS(JS::MutableHandle<JS::Value> d, const void * * s, const nsXPTType & type, const nsID * iid, unsigned int count, tag_nsresult * pErr) Line 1380	C++
 	xul.dll!XPCWrappedNative::CallMethod(XPCCallContext & ccx, XPCWrappedNative::CallMode mode) Line 1699	C++
 	xul.dll!XPC_WN_GetterSetter(JSContext * cx, unsigned int argc, JS::Value * vp) Line 1320	C++
 	mozjs.dll!js::Invoke(JSContext * cx, JS::CallArgs args, js::MaybeConstruct construct) Line 475	C++
 	mozjs.dll!js::Invoke(JSContext * cx, const JS::Value & thisv, const JS::Value & fval, unsigned int argc, const JS::Value * argv, JS::MutableHandle<JS::Value> rval) Line 531	C++
 	mozjs.dll!js::InvokeGetterOrSetter(JSContext * cx, JSObject * obj, JS::Value fval, unsigned int argc, JS::Value * argv, JS::MutableHandle<JS::Value> rval) Line 603	C++
 	mozjs.dll!js::Shape::get(JSContext * cx, JS::Handle<JSObject *> receiver, JSObject * obj, JSObject * pobj, JS::MutableHandle<JS::Value> vp) Line 46	C++
 	mozjs.dll!js::baseops::GetProperty(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<JSObject *> receiver, JS::Handle<jsid> id, JS::MutableHandle<JS::Value> vp) Line 4507	C++
 	mozjs.dll!GetPropertyOperation(JSContext * cx, js::InterpreterFrame * fp, JS::Handle<JSScript *> script, unsigned char * pc, JS::MutableHandle<JS::Value> lval, JS::MutableHandle<JS::Value> vp) Line 265	C++
 	mozjs.dll!Interpret(JSContext * cx, js::RunState & state) Line 2415	C++
 	mozjs.dll!js::RunScript(JSContext * cx, js::RunState & state) Line 422	C++
 	mozjs.dll!js::ExecuteKernel(JSContext * cx, JS::Handle<JSScript *> script, JSObject & scopeChainArg, const JS::Value & thisv, js::ExecuteType type, js::AbstractFramePtr evalInFrame, JS::Value * result) Line 634	C++
 	mozjs.dll!js::Execute(JSContext * cx, JS::Handle<JSScript *> script, JSObject & scopeChainArg, JS::Value * rval) Line 667	C++
 	mozjs.dll!ExecuteScript(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<JSScript *> scriptArg, JS::Value * rval) Line 4797	C++
 	mozjs.dll!JS_ExecuteScript(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<JSScript *> scriptArg, JS::MutableHandle<JS::Value> rval) Line 4803	C++
 	xul.dll!ProcessFile(JSContext * cx, JS::Handle<JSObject *> obj, const char * filename, _iobuf * file, bool forceTTY) Line 930	C++
 	xul.dll!Process(JSContext * cx, JS::Handle<JSObject *> obj, const char * filename, bool forceTTY) Line 1007	C++
 	xul.dll!ProcessArgs(JSContext * cx, JS::Handle<JSObject *> obj, char * * argv, int argc, XPCShellDirProvider * aDirProvider) Line 1135	C++
 	xul.dll!XRE_XPCShellMain(int argc, char * * argv, char * * envp) Line 1592	C++
 	xpcshell.exe!wmain(int argc, wchar_t * * argv) Line 109	C++
 	xpcshell.exe!__tmainCRTStartup() Line 533	C
 	kernel32.dll!@BaseThreadInitThunk@12()	Unknown
 	ntdll.dll!___RtlUserThreadStart@8()	Unknown
 	ntdll.dll!__RtlUserThreadStart@8()	Unknown



Expected results:

Packaging should complete properly.

Previous Thunderbird (24ESR) in the exact same environment with the same compiler flags builds and packages without any issues.
Something similar happens when building Firefox 31ESR by itself in VS2012 and trying to package.

Slightly different call stack but a similar error (access violation)

Unhandled exception at 0x65242C82 (xul.dll) in xpcshell.exe: 0xC0000005: Access violation reading location 0x00000011.

>	xul.dll!CallMethodHelper::~CallMethodHelper() Line 1748	C++
 	xul.dll!XPCWrappedNative::CallMethod(XPCCallContext & ccx, XPCWrappedNative::CallMode mode) Line 1699	C++
 	xul.dll!XPC_WN_GetterSetter(JSContext * cx, unsigned int argc, JS::Value * vp) Line 1320	C++
 	mozjs.dll!js::Invoke(JSContext * cx, JS::CallArgs args, js::MaybeConstruct construct) Line 475	C++
 	mozjs.dll!js::Invoke(JSContext * cx, const JS::Value & thisv, const JS::Value & fval, unsigned int argc, const JS::Value * argv, JS::MutableHandle<JS::Value> rval) Line 531	C++
 	mozjs.dll!js::InvokeGetterOrSetter(JSContext * cx, JSObject * obj, JS::Value fval, unsigned int argc, JS::Value * argv, JS::MutableHandle<JS::Value> rval) Line 603	C++
 	mozjs.dll!js::Shape::get(JSContext * cx, JS::Handle<JSObject *> receiver, JSObject * obj, JSObject * pobj, JS::MutableHandle<JS::Value> vp) Line 46	C++
 	mozjs.dll!js::baseops::GetProperty(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<JSObject *> receiver, JS::Handle<jsid> id, JS::MutableHandle<JS::Value> vp) Line 4507	C++
 	mozjs.dll!GetPropertyOperation(JSContext * cx, js::InterpreterFrame * fp, JS::Handle<JSScript *> script, unsigned char * pc, JS::MutableHandle<JS::Value> lval, JS::MutableHandle<JS::Value> vp) Line 265	C++
 	mozjs.dll!Interpret(JSContext * cx, js::RunState & state) Line 2415	C++
 	mozjs.dll!js::RunScript(JSContext * cx, js::RunState & state) Line 422	C++
 	mozjs.dll!js::ExecuteKernel(JSContext * cx, JS::Handle<JSScript *> script, JSObject & scopeChainArg, const JS::Value & thisv, js::ExecuteType type, js::AbstractFramePtr evalInFrame, JS::Value * result) Line 633	C++
 	mozjs.dll!js::Execute(JSContext * cx, JS::Handle<JSScript *> script, JSObject & scopeChainArg, JS::Value * rval) Line 667	C++
 	mozjs.dll!ExecuteScript(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<JSScript *> scriptArg, JS::Value * rval) Line 4797	C++
 	mozjs.dll!JS_ExecuteScript(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<JSScript *> scriptArg, JS::MutableHandle<JS::Value> rval) Line 4803	C++
 	xul.dll!ProcessFile(JSContext * cx, JS::Handle<JSObject *> obj, const char * filename, _iobuf * file, bool forceTTY) Line 930	C++
 	xul.dll!Process(JSContext * cx, JS::Handle<JSObject *> obj, const char * filename, bool forceTTY) Line 1007	C++
 	xul.dll!ProcessArgs(JSContext * cx, JS::Handle<JSObject *> obj, char * * argv, int argc, XPCShellDirProvider * aDirProvider) Line 1135	C++
 	xul.dll!XRE_XPCShellMain(int argc, char * * argv, char * * envp) Line 1592	C++
 	xpcshell.exe!wmain(int argc, wchar_t * * argv) Line 109	C++
 	xpcshell.exe!__tmainCRTStartup() Line 533	C
 	kernel32.dll!@BaseThreadInitThunk@12()	Unknown
 	ntdll.dll!___RtlUserThreadStart@8()	Unknown
 	ntdll.dll!__RtlUserThreadStart@8()	Unknown

The source tree is unchanged, with the exception of adding -GL- to libvpx to allow it to build on a /GL configuration without using PGO (bug 934984). Building with official branding from a fresh copy of the source tarball (from the Mozilla FTP). Optimizations and .mozconfig options are the same as what was previously used for ESR24 without issues. I don't know when this broke as I haven't really tried to build intermediate versions of Firefox.
--enable-optimize="-O2 -GFLs -GS- -fp:precise -Qfast_transcendentals -Qpar"

Trying to start firefox from the build dir before packaging also gives an immediate appcrash:
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	Firefox.exe
  Application Version:	31.0.0.5326
  Application Timestamp:	53dad7b9
  Fault Module Name:	MSVCR110.dll
  Fault Module Version:	11.0.51106.1
  Fault Module Timestamp:	5098858e
  Exception Code:	c0000005
  Exception Offset:	0000e33d
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	2057
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
Component: Untriaged → XPCOM
Product: Thunderbird → Core
Version: 31 → 31 Branch
Summary: Crash in XPCShell (xul.dll) @XPCConvert::NativeData2JS when packaging → Crash in XPCShell (xul.dll) when packaging after building 31ESR with VS2012
Flags: needinfo?(benjamin)
What information did you need from me?
Flags: needinfo?(benjamin)
You need to log in before you can comment on or make changes to this bug.