Bug#824449: firefox: FTBFS on sparc64 due to wrong platform definitions

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Sun Dec 11 23:20:32 UTC 2016


Attaching my latest patch which makes use of the ARM64 memory allocator, both for the
Javascript engine as well as mozjemalloc. It seems to fix the memory corruption and
allocation issues, but Firefox now crashes with SIGBUS in the xulrunner stub (see
below).

If anyone wants to have a go at this, just get the source of the current firefox
package in Debian (version 50) and apply the patch with "patch -p1", then run
"dpkg-source --commit" in the source tree to apply the patch to quilt.

Thanks,
Adrian

Thread 1 "xpcshell" received signal SIGBUS, Bus error.
0xfff8000100c12224 in invoke_copy_to_stack (d=<optimized out>, paramCount=<optimized out>, s=<optimized out>)
    at /build/firefox-wic4ZJ/firefox-50.0.2/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc_solaris.cpp:126
126                 break;
(gdb)  bt
#0  0xfff8000100c12224 in invoke_copy_to_stack (d=<optimized out>, paramCount=<optimized out>, s=<optimized out>)
    at /build/firefox-wic4ZJ/firefox-50.0.2/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc_solaris.cpp:126
#1  0xfff8000100c1760c in NS_InvokeByIndex ()
    at /build/firefox-wic4ZJ/firefox-50.0.2/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_linux_GCC3.s:32
#2  0xfff800010116084c in CallMethodHelper::Invoke (this=0x7feffffc6a8)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCWrappedNative.cpp:2075
#3  CallMethodHelper::Call (this=0x7feffffc6a8)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCWrappedNative.cpp:1394
#4  XPCWrappedNative::CallMethod (ccx=..., mode=mode at entry=XPCWrappedNative::CALL_GETTER)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCWrappedNative.cpp:1361
#5  0xfff8000101167560 in XPCWrappedNative::GetAttribute (ccx=...)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/xpcprivate.h:1950
#6  XPC_WN_GetterSetter (cx=<optimized out>, cx at entry=0x7000189a000, argc=<optimized out>, vp=0x7feffffcc28)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1164
#7  0xfff8000102bacc5c in js::CallJSNative (args=..., native=<optimized out>, cx=0x7000189a000)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/jscntxtinlines.h:235
#8  js::InternalCallOrConstruct (cx=0x7000189a000, args=..., construct=<optimized out>)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:453
#9  0xfff8000102bacde0 in InternalCall (cx=cx at entry=0x7000189a000, args=...)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:498
#10 0xfff8000102bace50 in js::Call (cx=cx at entry=0x7000189a000, fval=..., thisv=..., args=..., rval=...)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:517
#11 0xfff8000102bacf08 in js::CallGetter (cx=cx at entry=0x7000189a000, thisv=..., getter=..., rval=...)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:631
#12 0xfff8000102bacfe0 in CallGetter (cx=cx at entry=0x7000189a000, obj=..., receiver=..., shape=..., vp=...)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/NativeObject.cpp:1737
#13 0xfff8000102bad264 in GetExistingProperty<(js::AllowGC)1> (vp=..., shape=..., obj=..., receiver=..., cx=0x7000189a000)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/NativeObject.cpp:1785
#14 NativeGetPropertyInline<(js::AllowGC)1> (vp=..., nameLookup=NotNameLookup, id=..., receiver=..., obj=...,
---Type <return> to continue, or q <return> to quit---
    0) at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/NativeObject.cpp:2012

#15 js::NativeGetProperty (cx=0x7000189a000, obj=..., receiver=..., id=..., vp=...) at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/NativeObject.cpp:2046

#16 0xfff8000102a264b0 in js::GetProperty (cx=cx at entry=0x7000189a000, obj=..., receiver=..., id=..., vp=...) at
/build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/NativeObject.h:1478
#17 0xfff8000102bae7f0 in js::GetProperty (vp=..., name=<optimized out>, receiver=..., obj=..., cx=0x7000189a000) at
/build/firefox-wic4ZJ/firefox-50.0.2/js/src/jsobj.h:836
#18 js::GetProperty (cx=0x7000189a000, v=..., name=..., vp=...) at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:4161

#19 0xfff8000102ba1bb4 in GetPropertyOperation (vp=..., lval=..., pc=<optimized out>, script=..., fp=<optimized out>, cx=<optimized out>)

    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:189

#20 Interpret (cx=0x7000189a000, state=...) at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:2590

#21 0xfff8000102bac9a4 in js::RunScript (cx=cx at entry=0x7000189a000, state=...) at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:399

#22 0xfff8000102bb55a4 in js::ExecuteKernel (cx=cx at entry=0x7000189a000, script=..., scopeChainArg=..., newTargetValue=..., evalInFrame=...,
result=result at entry=0x7feffffd990)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:679

#23 0xfff8000102bb56ec in js::Execute (cx=cx at entry=0x7000189a000, script=..., scopeChainArg=..., rval=rval at entry=0x7feffffd990)

    at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/vm/Interpreter.cpp:712

#24 0xfff8000102a25a9c in ExecuteScript (cx=cx at entry=0x7000189a000, scope=..., script=..., rval=rval at entry=0x7feffffd990) at
/build/firefox-wic4ZJ/firefox-50.0.2/js/src/jsapi.cpp:4343
#25 0xfff8000102a2cccc in JS_ExecuteScript (cx=0x7000189a000, scriptArg=..., rval=...) at /build/firefox-wic4ZJ/firefox-50.0.2/js/src/jsapi.cpp:4369

#26 0xfff8000101148d9c in ProcessFile (jsapi=..., filename=filename at entry=0x7fefffff720
"/build/firefox-wic4ZJ/firefox-50.0.2/toolkit/mozapps/installer/precompile_cache.js",
    file=file at entry=0x700040e7800, forceTTY=forceTTY at entry=false) at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCShellImpl.cpp:875

#27 0xfff8000100b6deb0 in Process (jsapi=..., filename=0x7fefffff720 "/build/firefox-wic4ZJ/firefox-50.0.2/toolkit/mozapps/installer/precompile_cache.js",
forceTTY=<optimized out>)
    at /build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCShellImpl.cpp:928

#28 0xfff800010114e4ac in ProcessArgs (aDirProvider=0x7feffffed18, argc=4, argv=0x7fefffff440, jsapi=...) at
/build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCShellImpl.cpp:1075
#29 XRE_XPCShellMain (argc=4, argv=0x7fefffff440, envp=<optimized out>, aShellData=<optimized out>) at
/build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/src/XPCShellImpl.cpp:1570
#30 0x0000010000003f3c in main (argc=<optimized out>, argv=<optimized out>, envp=0x7fefffff468) at
/build/firefox-wic4ZJ/firefox-50.0.2/js/xpconnect/shell/xpcshell.cpp:62
(gdb)


> [1] https://hg.mozilla.org/mozilla-central/rev/dfaafbaaa291

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
-------------- next part --------------
A non-text attachment was scrubbed...
Name: firefox-sparc64.patch
Type: text/x-patch
Size: 23142 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mozilla-maintainers/attachments/20161212/3b322d7a/attachment-0001.bin>


More information about the pkg-mozilla-maintainers mailing list