All users were logged out of Bugzilla on October 13th, 2018

nsXKBModeSwitch::HandleMappingNotify should null check GDK_DISPLAY

RESOLVED FIXED

Status

()

RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
phroggy@boffo:/public/temp/mozilla/dist/bin$ ./run-mozilla.sh -g -d gdb ./xpcshell
js> const C=Components.classes,I=Components.interfaces;
js> var o;
js> for (a in C) try { o=C[a].createInstance(); for (i in I) o instanceof I[i];
} catch (e) {}

WARNING: nsXKBModeSwitch::ControlWorkaround:, file nsKeyboardUtils.cpp, line 78
WARNING:     grab_during, file nsKeyboardUtils.cpp, line 79
WARNING:     ungrab_duri, file nsKeyboardUtils.cpp, line 80

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 4161)]
0x417f02b8 in XGetModifierMapping () from /usr/X11R6/lib/libX11.so.6
Current language:  auto; currently c
(gdb) bt
#0  0x417f02b8 in XGetModifierMapping () from /usr/X11R6/lib/libX11.so.6
#1  0x41cf84a1 in nsXKBModeSwitch::HandleMappingNotify () at nsKeyboardUtils.cpp:122
#2  0x41cf83eb in nsXKBModeSwitch::ControlWorkaround (grab_during_popup=1,
ungrab_during_mode_switch=1) at nsKeyboardUtils.cpp:88
#3  0x41d040b7 in nsWindow::nsWindow (this=0x86c1648) at nsWindow.cpp:311
#4  0x41d028d2 in nsWindowConstructor (aOuter=0x0, aIID=@0xbfffd7e8,
aResult=0xbfffd7d8) at nsWidgetFactory.cpp:68
#5  0x4020dc94 in nsGenericFactory::CreateInstance (this=0x86c1868, aOuter=0x0,
aIID=@0xbfffd7e8, aResult=0xbfffd7d8) at nsGenericFactory.cpp:84
#6  0x401bb709 in nsComponentManagerImpl::CreateInstance (this=0x8058008,
aClass=@0x870d324, aDelegate=0x0, aIID=@0xbfffd7e8, aResult=0xbfffd7d8)
    at nsComponentManager.cpp:1817
#7  0x401c06d6 in nsComponentManager::CreateInstance (aClass=@0x870d324,
aDelegate=0x0, aIID=@0xbfffd7e8, aResult=0xbfffd7d8)
    at nsComponentManagerObsolete.cpp:102
#8  0x4050e062 in nsJSCID::CreateInstance (this=0x870d308, _retval=0xbfffda48)
at xpcjsid.cpp:793
#9  0x401f1ca8 in XPTC_InvokeByIndex () at xptcinvoke_gcc_x86_unix.cpp:86
#10 0x40524c39 in XPCWrappedNative::CallMethod (ccx=@0xbfffdb00,
mode=CALL_METHOD) at xpcwrappednative.cpp:2016
#11 0x4052dc2e in XPC_WN_CallMethod (cx=0x80b6aa8, obj=0x87231f0, argc=0,
argv=0x80d4470, vp=0xbfffdc40) at xpcwrappednativejsops.cpp:1283
#12 0x4006291b in js_Invoke (cx=0x80b6aa8, argc=0, flags=0) at jsinterp.c:839
#13 0x40071a62 in js_Interpret (cx=0x80b6aa8, result=0xbffff6cc) at jsinterp.c:2803
#14 0x4006306a in js_Execute (cx=0x80b6aa8, chain=0x808c8c0, script=0x80d1388,
down=0x0, special=0, result=0xbffff6cc) at jsinterp.c:1020
#15 0x40030677 in JS_ExecuteScript (cx=0x80b6aa8, obj=0x808c8c0,
script=0x80d1388, rval=0xbffff6cc) at jsapi.c:3277
#16 0x804bc61 in Process (cx=0x80b6aa8, obj=0x808c8c0, filename=0x0,
filehandle=0x403376e0) at xpcshell.cpp:517
#17 0x804c1d5 in ProcessArgs (cx=0x80b6aa8, obj=0x808c8c0, argv=0xbffff868,
argc=0) at xpcshell.cpp:655
#18 0x804cd8e in main (argc=0, argv=0xbffff868) at xpcshell.cpp:912
#19 0x403852eb in __libc_start_main (main=0x804c544 <main>, argc=1,
ubp_av=0xbffff864, init=0x804a7a4 <_init>, fini=0x804f030 <_fini>, 
    rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbffff85c) at
../sysdeps/generic/libc-start.c:129
(gdb)
(Assignee)

Comment 1

16 years ago
Created attachment 106593 [details] [diff] [review]
fix
(Assignee)

Updated

16 years ago
Attachment #106593 - Flags: superreview?(bzbarsky)
Attachment #106593 - Flags: review?(bryner)
Attachment #106593 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 106593 [details] [diff] [review]
fix

Apart from it being silly to construct widgets from scripts, r=bryner
Attachment #106593 - Flags: review?(bryner) → review+
(Assignee)

Comment 3

16 years ago
checked in
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Didn't we have a conversation about how I thought this was a really bad way to
fix this problem and that it was wallpaper?
You need to log in before you can comment on or make changes to this bug.