Subject: bug#12579: 24.1; Emacs 24.1 / 24.2 (daily) crashes

From: "Fabrice Niessen" <[email-masked]>
Date: Tue, 09 Oct 2012 08:53:04 +0200

Hi Eli,

Eli Zaretskii wrote:
>> From: "Drew Adams" <[email-masked]>
>> Cc: "'Eli Zaretskii'" <[email-masked]>,
>>         "'Fabrice Niessen'" <[email-masked]>,
>>         <[email-masked]>
>> Date: Sun, 7 Oct 2012 10:48:16 -0700
>> 
>> > Perhaps something in the build process, compiler version, compilation
>> > options...?  It's hard to pinpoint any connection between both
>> > problems without backtraces, though.
>> 
>> Admittedly, there is not much to go on.  Hopefully there will be more reports,
>> with more useful information.
>
> If you, or others, can provide backtraces of these crashes, that would
> be a useful beginning.

Another crash... On Emacs 24.2 when editing a mail in Message mode:

$ gdb -p 5552
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 5552
[New Thread 5552.0xb8c]
[New Thread 5552.0x1108]
[New Thread 5552.0x171c]
Reading symbols from /cygdrive/c/Program Files/Emacs-24.2/bin/emacs.exe...done.
Warning: /cygdrive/c/Program Files/Emacs-24.2/../lwlib: No such file or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 1 at 0x1154889: file w32fns.c, line 7200.
Temporary breakpoint 2 at 0x11449c9: file sysdep.c, line 819.
(gdb) continue
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 5552.0xb8c]
0x7c91120f in ntdll!DbgUiConnectToDbg () from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) thread apply all backtrace

Thread 2 (Thread 5552.0x1108):
#0  0x7c91e514 in ntdll!LdrAccessResource () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7e3991be in USER32!GetProcessWindowStation () from /cygdrive/c/WINDOWS/system32/USER32.dll
#2  0x7e3991f1 in USER32!GetMessageW () from /cygdrive/c/WINDOWS/system32/USER32.dll
#3  0x011490bd in w32_msg_pump (msg_buf=0x7236ff54) at w32fns.c:2263
#4  0x011492fb in w32_msg_worker@4 (arg=0x0) at w32fns.c:2485
#5  0x7c80b729 in KERNEL32!GetModuleFileNameA () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#6  0x00000000 in ?? ()

Lisp Backtrace:
"re-search-forward" (0x82ae48)
0x4048798 PVEC_COMPILED
"font-lock-fontify-keywords-region" (0x82b458)
"font-lock-default-fontify-region" (0x82b758)
"font-lock-fontify-region" (0x82bb9c)
"run-hook-with-args" (0x82bb98)
"byte-code" (0x82be0c)
"jit-lock-fontify-now" (0x82c298)
"jit-lock-function" (0x82c664)

Thread 1 (Thread 5552.0xb8c):
#0  0x7c91120f in ntdll!DbgUiConnectToDbg () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x011548c0 in emacs_abort () at w32fns.c:7214
#2  0x01055503 in sys_kill (pid=5552, sig=22) at w32proc.c:1432
#3  0x010014fc in fatal_error_backtrace (sig=22, backtrace_limit=2147483647) at emacs.c:331
#4  0x010431b7 in die (msg=0x1537030 "assertion failed: buffer->base_buffer->indirections > 0", file=0x1535810 "buffer.c",
    line=1664) at alloc.c:6398
#5  0x010ac068 in compact_buffer (buffer=0x3c43800) at buffer.c:1664
#6  0x0103fde2 in Fgarbage_collect () at alloc.c:5085
#7  0x0103997b in maybe_gc () at lisp.h:3637
#8  0x01036105 in Ffuncall (nargs=4, args=0x82ae44) at eval.c:2747
#9  0x010e0e77 in exec_byte_code (bytestr=62899649, vector=67405669, maxdepth=16, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:899
#10 0x01037624 in funcall_lambda (fun=67405725, nargs=1, arg_vector=0x35bc81a <__register_frame_info+56346650>) at eval.c:3028
#11 0x01036abd in Ffuncall (nargs=2, args=0x82b144) at eval.c:2845
#12 0x010e0e77 in exec_byte_code (bytestr=20885385, vector=20885637, maxdepth=36, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:899
#13 0x01037624 in funcall_lambda (fun=20885357, nargs=3, arg_vector=0x35bc81a <__register_frame_info+56346650>) at eval.c:3028
#14 0x01036abd in Ffuncall (nargs=4, args=0x82b454) at eval.c:2845
#15 0x010e0e77 in exec_byte_code (bytestr=20881041, vector=20881213, maxdepth=20, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:899
#16 0x01037624 in funcall_lambda (fun=20880997, nargs=3, arg_vector=0x35bc81a <__register_frame_info+56346650>) at eval.c:3028
#17 0x01036abd in Ffuncall (nargs=4, args=0x82b754) at eval.c:2845
#18 0x010e0e77 in exec_byte_code (bytestr=20879369, vector=20879421, maxdepth=16, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:899
#19 0x01037624 in funcall_lambda (fun=20879309, nargs=2, arg_vector=0x35bc81a <__register_frame_info+56346650>) at eval.c:3028
---Type <return> to continue, or q <return> to quit---
#20 0x01036abd in Ffuncall (nargs=3, args=0x82bb98) at eval.c:2845
#21 0x010358eb in funcall_nil (nargs=3, args=0x82bb98) at eval.c:2338
#22 0x01035d22 in run_hook_with_args (nargs=3, args=0x82bb98, funcall=0x10358d3 <funcall_nil>) at eval.c:2527
#23 0x01035962 in Frun_hook_with_args (nargs=3, args=0x82bb98) at eval.c:2388
#24 0x0103640c in Ffuncall (nargs=4, args=0x82bb94) at eval.c:2777
#25 0x010e0e77 in exec_byte_code (bytestr=20308769, vector=20895285, maxdepth=16, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:899
#26 0x010e023e in Fbyte_code (bytestr=20308769, vector=20895285, maxdepth=16) at bytecode.c:474
#27 0x01034a57 in eval_sub (form=20895238) at eval.c:2163
#28 0x010325bd in internal_lisp_condition_case (var=58199066, bodyform=20895238, handlers=20895310) at eval.c:1262
#29 0x010e1ab4 in exec_byte_code (bytestr=20894849, vector=20895013, maxdepth=32, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:1095
#30 0x01037624 in funcall_lambda (fun=20894821, nargs=2, arg_vector=0x35bc81a <__register_frame_info+56346650>) at eval.c:3028
#31 0x01036abd in Ffuncall (nargs=3, args=0x82c294) at eval.c:2845
#32 0x010e0e77 in exec_byte_code (bytestr=20894417, vector=20894541, maxdepth=40, args_template=56346650, nargs=0, args=0x0)
    at bytecode.c:899
#33 0x01037624 in funcall_lambda (fun=20894389, nargs=1, arg_vector=0x35bc81a <__register_frame_info+56346650>) at eval.c:3028
#34 0x01036abd in Ffuncall (nargs=2, args=0x82c660) at eval.c:2845
#35 0x01032973 in internal_condition_case_n (bfun=0x1036042 <Ffuncall>, nargs=2, args=0x82c660, handlers=56346674,
    hfun=0x11e4053 <safe_eval_handler>) at eval.c:1432
#36 0x011e417e in safe_call (nargs=2, func=59487098) at xdisp.c:2457
#37 0x011e41bb in safe_call1 (fn=59487098, arg=2680) at xdisp.c:2473
#38 0x011e7472 in handle_fontified_prop (it=0x82d254) at xdisp.c:3646
#39 0x011e655e in handle_stop (it=0x82d254) at xdisp.c:3210
#40 0x011f54f4 in next_element_from_buffer (it=0x82d254) at xdisp.c:7903
#41 0x011f1041 in get_next_display_element (it=0x82d254) at xdisp.c:6568
#42 0x0121b432 in display_line (it=0x82d254) at xdisp.c:19382
#43 0x01211c15 in try_window (window=68976245, pos=..., flags=1) at xdisp.c:16285
#44 0x0120f741 in redisplay_window (window=68976245, just_this_one_p=0) at xdisp.c:15811
#45 0x01208e35 in redisplay_window_0 (window=68976245) at xdisp.c:13879
#46 0x01032787 in internal_condition_case_1 (bfun=0x1208dff <redisplay_window_0>, arg=68976245, handlers=56329326,
    hfun=0x1208ddb <redisplay_window_error>) at eval.c:1346
#47 0x01208dc2 in redisplay_windows (window=68976245) at xdisp.c:13859
#48 0x012071cc in redisplay_internal () at xdisp.c:13439
#49 0x01203fe4 in redisplay () at xdisp.c:12648
#50 0x01008d3f in read_char (commandflag=1, nmaps=8, maps=0x82f980, prev_event=56346650, used_mouse_menu=0x82fa68, end_time=0x0)
    at keyboard.c:2464
#51 0x0101ccb2 in read_key_sequence (keybuf=0x82fbf0, bufsize=30, prompt=56346650, dont_downcase_last=0,
    can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9312
#52 0x01005f89 in command_loop_1 () at keyboard.c:1487
#53 0x0103269f in internal_condition_case (bfun=0x1005a97 <command_loop_1>, handlers=56397234, hfun=0x100526a <cmd_error>)
    at eval.c:1308
#54 0x010056c4 in command_loop_2 (ignore=56346650) at keyboard.c:1182
#55 0x010320bb in internal_catch (tag=56387090, func=0x10056a0 <command_loop_2>, arg=56346650) at eval.c:1069
#56 0x0100567e in command_loop () at keyboard.c:1161
#57 0x01004c27 in recursive_edit_1 () at keyboard.c:782
#58 0x01004f54 in Frecursive_edit () at keyboard.c:846
---Type <return> to continue, or q <return> to quit---
#59 0x01002b68 in main (argc=1, argv=0xa43e18) at emacs.c:1655

Lisp Backtrace:
"re-search-forward" (0x82ae48)
0x4048798 PVEC_COMPILED
"font-lock-fontify-keywords-region" (0x82b458)
"font-lock-default-fontify-region" (0x82b758)
"font-lock-fontify-region" (0x82bb9c)
"run-hook-with-args" (0x82bb98)
"byte-code" (0x82be0c)
"jit-lock-fontify-now" (0x82c298)
"jit-lock-function" (0x82c664)
(gdb) xbacktrace
"re-search-forward" (0x82ae48)
0x4048798 PVEC_COMPILED
"font-lock-fontify-keywords-region" (0x82b458)
"font-lock-default-fontify-region" (0x82b758)
"font-lock-fontify-region" (0x82bb9c)
"run-hook-with-args" (0x82bb98)
"byte-code" (0x82be0c)
"jit-lock-fontify-now" (0x82c298)
"jit-lock-function" (0x82c664)
(gdb)

Best regards,
Fabrice Niessen