Subject: Segmentation fault at exit if server-mode

From: Lennart Borgman <[email-masked]>
Date: Thu, 27 May 2010 05:08:42 +0200

I get a segmentation fault on w32 at Emacs exit if server-mode is
enabled and with -Q. This is with a trunk checkout from 2010-05-22.

*** Here is a backtrace and the last messages from gdb:

warning: BTMMHOOK 27.05.2010 05:01:44 Thread<0E68> Hook DLL loaded

[New Thread 3168.0xf98]
warning: BTMMHOOK 27.05.2010 05:01:52 Thread<0A24> Hook DLL unloaded

Program received signal SIGSEGV, Segmentation fault.
0x7c809eda in KERNEL32!IsBadReadPtr () from C:\WINDOWS\system32\kernel32.dll
(gdb) bt
#0  0x7c809eda in KERNEL32!IsBadReadPtr ()
   from C:\WINDOWS\system32\kernel32.dll
#1  0x5f180000 in ?? ()
#2  0x03105cce in ?? ()
   from C:\Program Files\Tall Emu\Online Armor\oawatch.dll
#3  0x030f33d7 in ?? ()
   from C:\Program Files\Tall Emu\Online Armor\oawatch.dll
#4  0x03108476 in ?? ()
   from C:\Program Files\Tall Emu\Online Armor\oawatch.dll
#5  0x0310949e in ?? ()
   from C:\Program Files\Tall Emu\Online Armor\oawatch.dll
#6  0x030f3ea0 in ?? ()
   from C:\Program Files\Tall Emu\Online Armor\oawatch.dll
#7  0x030f41d6 in ?? ()
   from C:\Program Files\Tall Emu\Online Armor\oawatch.dll
#8  0x7c90118a in ntdll!LdrSetAppCompatDllRedirectionCallback ()
   from C:\WINDOWS\system32\ntdll.dll
#9  0x030f0000 in ?? ()
#10 0x7c923ada in ntdll!RtlDestroyQueryDebugBuffer ()
   from C:\WINDOWS\system32\ntdll.dll
#11 0x7c81caae in KERNEL32!IsValidLocale ()
   from C:\WINDOWS\system32\kernel32.dll
#12 0x7c81cb26 in KERNEL32!ExitProcess ()
   from C:\WINDOWS\system32\kernel32.dll
#13 0x77c39d45 in strerror () from C:\WINDOWS\system32\msvcrt.dll
#14 0x77c39e78 in msvcrt!_initterm () from C:\WINDOWS\system32\msvcrt.dll
#15 0x77c39e90 in msvcrt!exit () from C:\WINDOWS\system32\msvcrt.dll
#16 0x01002ed6 in Fkill_emacs (arg=46135322) at emacs.c:2093
#17 0x01022d0f in Ffuncall (nargs=1, args=0x82f450) at eval.c:3073
#18 0x0116e455 in Fbyte_code (bytestr=19032417, vector=19032437, maxdepth=20)
    at bytecode.c:680
#19 0x0102344d in funcall_lambda (fun=19032389, nargs=1, arg_vector=0x82f694)
    at eval.c:3260
#20 0x01022f2c in Ffuncall (nargs=2, args=0x82f690) at eval.c:3119
#21 0x0116e455 in Fbyte_code (bytestr=19032649, vector=19032669, maxdepth=12)
    at bytecode.c:680
#22 0x0102344d in funcall_lambda (fun=19032621, nargs=1, arg_vector=0x82f914)
    at eval.c:3260
#23 0x01022f2c in Ffuncall (nargs=2, args=0x82f910) at eval.c:3119
#24 0x0116d94f in Fcall_interactively (function=47311594,
    record_flag=46135322, keys=46156549) at callint.c:869
#25 0x01022d63 in Ffuncall (nargs=4, args=0x82fb90) at eval.c:3079
#26 0x010228a3 in call3 (fn=46281234, arg1=47311594, arg2=46135322,
    arg3=46135322) at eval.c:2901
#27 0x01014299 in Fcommand_execute (cmd=47311594, record_flag=46135322,
    keys=46135322, special=46135322) at keyboard.c:10397
#28 0x010069d5 in command_loop_1 () at keyboard.c:1755
#29 0x010206bf in internal_condition_case (bfun=0x1006315 <command_loop_1>,
    handlers=46192882, hfun=0x1005d06 <cmd_error>) at eval.c:1510
#30 0x0100607a in command_loop_2 () at keyboard.c:1356
#31 0x010201b0 in internal_catch (tag=46191050,
    func=0x1006057 <command_loop_2>, arg=46135322) at eval.c:1246
#32 0x01006030 in command_loop () at keyboard.c:1335
#33 0x01005922 in recursive_edit_1 () at keyboard.c:950
#34 0x01005a86 in Frecursive_edit () at keyboard.c:1012
#35 0x0100284d in main (argc=2, argv=0xa94348) at emacs.c:1782

Lisp Backtrace:
"kill-emacs" (0x82f454)
"save-buffers-kill-emacs" (0x82f694)
"save-buffers-kill-terminal" (0x82f914)
"call-interactively" (0x82fb94)
(gdb)