Closed
Bug 25186
Opened 25 years ago
Closed 25 years ago
M13 assembly code seg faults on FreeBSD
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
RESOLVED
INVALID
People
(Reporter: hsu, Assigned: dp)
Details
The inline assembly code in
xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp
core dumps in FreeBSD:
(gdb) run
Starting program: /A/ports/www/mozilla13/work/mozilla/dist/bin/./mozilla-bin
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
Program received signal SIGSEGV, Segmentation fault.
0x0 in ?? ()
(gdb) bt
#0 0x0 in ?? ()
#1 0x281abbee in XPTC_InvokeByIndex (that=0x8166f60, methodIndex=4,
paramCount=1, params=0xbfbfe4f0) at xptcinvoke_unixish_x86.cpp:159
#2 0x28551825 in nsXPCWrappedNativeClass::CallWrappedMethod (this=0x8167700,
cx=0x8092000, wrapper=0x8167740, desc=0x815d728, callMode=CALL_GETTER,
argc=0, argv=0x0, vp=0xbfbfe744) at xpcwrappednativeclass.cpp:904
#3 0x28553404 in WrappedNative_GetProperty (cx=0x8092000, obj=0x8154fa0,
id=135692384, vp=0xbfbfe744) at xpcwrappednativejsops.cpp:235
#4 0x280d4c0a in js_Interpret (cx=0x8092000, result=0xbfbfe7f0)
at jsinterp.c:2218
#5 0x280cf19c in js_Invoke (cx=0x8092000, argc=1, flags=0) at jsinterp.c:682
#6 0x280d56a9 in js_Interpret (cx=0x8092000, result=0xbfbfeb0c)
at jsinterp.c:2262
Found the problem. FreeBSD-current changed from thunk to cfront vtbl format.
A simple header file change and recompile fixed the problem.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
So what did you change? I tried changing
xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h so FreeBSD to
#define CFRONT_STYLE_THIS_ADJUST, but it still crashes on startup:
./mozilla
.//run-mozilla.sh ./mozilla-bin
MOZILLA_FIVE_HOME=/home/mreimer/projects/mozilla/dist/bin
LD_LIBRARY_PATH=/home/mreimer/projects/mozilla/dist/bin
SHLIB_PATH=/home/mreimer/projects/mozilla/dist/bin
LIBPATH=/home/mreimer/projects/mozilla/dist/bin
MOZ_PROGRAM=./mozilla-bin
MOZ_TOOLKIT=
moz_debug=0
moz_debugger=
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
nsUnixToolkitService: Using 'gtk' for the Widget Toolkit.
nsUnixToolkitService: Using 'gtk' for the Gfx Toolkit.
NS_SetupRegistry() MOZ_TOOLKIT=gtk, WIDGET_DLL=libwidget_gtk.so,
GFX_DLL=libgfx_gtk.so
initialized appshell
GFX: dpi=96 t2p=0.0666667 p2t=15 depth=16
WEBSHELL+ = 1
Note: styleverifytree is disabled
Note: frameverifytree is disabled
WEBSHELL+ = 2
Block(spring)(5)@0x83c0134: WARNING: desired:107374182,315
Block(spring)(7)@0x83c02a0: WARNING: desired:107374182,315
Note: verifyreflow is disabled
Segmentation fault - core dumped
#0 0x28b61df4 in nsGCCache::GetGCFromDW (this=0x81da390, window=0x82c9780,
gcv=0xbfbfe950, flags=32777, clipRegion=0x81448f0) at nsGCCache.cpp:122
#1 0x28b61f1c in nsGCCache::GetClipGC (this=0x81da390, window=0x82c9780,
gcv=0xbfbfe950, flags=32777, clipRegion=0x81448f0) at nsGCCache.cpp:140
#2 0x28b631c7 in nsRenderingContextGTK::UpdateGC (this=0x838c180)
at nsRenderingContextGTK.cpp:518
#3 0x28b63a5f in nsRenderingContextGTK::CreateDrawingSurface (this=0x838c180,
aBounds=0xbfbfea58, aSurfFlags=0, aSurface=@0x292fd004)
at nsRenderingContextGTK.cpp:789
#4 0x292edddc in nsViewManager::GetDrawingSurface (this=0x82b1800,
aContext=@0x838c180, aBounds=@0xbfbfeb48) at nsViewManager.cpp:2188
#5 0x292e842c in nsViewManager::Refresh (this=0x82b1800, aView=0x82beb80,
aContext=0x838c180, rect=0xbfbfec18, aUpdateFlags=1)
at nsViewManager.cpp:585
#6 0x292ec1da in nsViewManager::DispatchEvent (this=0x82b1800,
aEvent=0xbfbfee14, aStatus=0xbfbfec84) at nsViewManager.cpp:1615
#7 0x292db1da in HandleEvent (aEvent=0xbfbfee14) at nsView.cpp:68
#8 0x286edb9a in nsWidget::DispatchEvent (this=0x8293a00, aEvent=0xbfbfee14,
aStatus=@0xbfbfed84) at nsWidget.cpp:1366
#9 0x286ed741 in nsWidget::DispatchWindowEvent (this=0x8293a00,
event=0xbfbfee14) at nsWidget.cpp:1257
#10 0x286f37a9 in nsWindow::DoPaint (this=0x8293a00, aX=0, aY=0, aWidth=2,
aHeight=1, aClipRegion=0x82c20a0) at nsWindow.cpp:588
#11 0x286f3936 in nsWindow::Update (this=0x8293a00) at nsWindow.cpp:617
#12 0x292ebaee in nsViewManager::Composite (this=0x82b1800)
at nsViewManager.cpp:1428
#13 0x292e6a50 in vm_timer_callback (aTimer=0x81d9040, aClosure=0x82b1800)
at nsViewManager.cpp:88
#14 0x29300e85 in nsTimerGtk::FireTimeout (this=0x81d9040) at nsTimerGtk.cpp:48
#15 0x293014e1 in nsTimerExpired (aCallData=0x81d9040) at nsTimerGtk.cpp:165
#16 0x28892757 in g_timeout_dispatch () from /usr/local/lib/libglib12.so.3
#17 0x288918df in g_main_dispatch () from /usr/local/lib/libglib12.so.3
#18 0x28891ef8 in g_main_iterate () from /usr/local/lib/libglib12.so.3
#19 0x28892090 in g_main_run () from /usr/local/lib/libglib12.so.3
#20 0x287b5af7 in gtk_main () from /usr/X11R6/lib/libgtk12.so.2
#21 0x286d12ea in nsAppShell::Run (this=0x81035c0) at nsAppShell.cpp:304
#22 0x2858101b in nsAppShellService::Run (this=0x8094840)
at nsAppShellService.cpp:455
#23 0x28b106f8 in nsProfile::LoadDefaultProfileDir (this=0x81bf980,
profileURLStr=@0xbfbff2f8) at nsProfile.cpp:312
#24 0x28b10154 in nsProfile::StartupWithArgs (this=0x81bf980,
cmdLineArgs=0x80a8900) at nsProfile.cpp:231
#25 0x804c2d4 in main1 (argc=1, argv=0xbfbff4fc) at nsAppRunner.cpp:543
#26 0x804ccd4 in main (argc=1, argv=0xbfbff4fc) at nsAppRunner.cpp:690
#27 0x804ad85 in _start ()
That was indeed the change I made.
Some shots in the dark:
Are you using the Mozilla port in /usr/ports/www/mozilla? That's what I'm
using.
I recompiled Mozilla from scratch after the change, not an incremental build.
You need a matching ld and libg++. I just rebuilt the world from source.
No, I'm using the latest source, checked out this morning and rebuilt everything
from scratch.
You need to log in
before you can comment on or make changes to this bug.
Description
•