[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: Emacs crashes



I've succeeded to reproduce the SEGV.
Better report may be provided by Yamaoka-san.

However, the place where I gto SEGV is different from the original
Yamaoka-san's report.

(gdb) xbacktrace
"format-mode-line"
"w3m-modeline-title"
(gdb) where
#0  parse_str_as_multibyte (str=0x85a8000 <Address 0x85a8000 out of bounds>, len=18955451, nchars=0x832c880, nbytes=0x832c880) at charset.c:1491
#1  0x08158a61 in make_string (contents=0x8522930 "\220P\360\tP\355\343\tw3m*<2>    / Excite \222\245\250\222\245\255\222\245\265\222\245\244\222\245\310 \222\313\335\222\314\365 : \222\261\321\222\270\354\222\313\335\222\314\365 \222\303\346\222\271\361\222\270\354\222\313\335\222\314\365 \222\264\332\222\271\361\222\270\354\222\313\335\222\314h", nbytes=18955451) at alloc.c:2334
#2  0x080aa3a1 in Fformat_mode_line (format=137940117, face=137546065, window=139602224, buffer=-1075272656) at xdisp.c:16366
#3  0x0816db28 in Feval (form=136136992) at eval.c:2133
#4  0x0816c94d in Fcondition_case (args=137546065) at eval.c:1336
#5  0x08195262 in Fbyte_code (bytestr=165821832, vector=143, maxdepth=-1075271468) at bytecode.c:864
#6  0x0816e792 in funcall_lambda (fun=156499388, nargs=0, arg_vector=0xbfe8a990) at eval.c:2979
#7  0x0816e617 in apply_lambda (fun=156499388, args=137546065, eval_flag=1) at eval.c:2901
#8  0x0816d9a4 in Feval (form=156499388) at eval.c:2191
#9  0x0816cb4c in internal_condition_case_1 (bfun=0x816d800 <Feval>, arg=164579925, handlers=137546113, hfun=0x80955e0 <safe_eval_handler>) at eval.c:1430
#10 0x08095654 in safe_eval (sexpr=164579925) at xdisp.c:1979
#11 0x080a99ef in display_mode_element (it=0xbfe8ad40, depth=5, field_width=-13, precision=-20, elt=164579949, props=137546065, risky=0) at xdisp.c:16052
#12 0x080a98d1 in display_mode_element (it=0xbfe8ad40, depth=3, field_width=0, precision=-7, elt=165868373, props=137546065, risky=0) at xdisp.c:16133
#13 0x080a98d1 in display_mode_element (it=0xbfe8ad40, depth=1, field_width=0, precision=0, elt=137940085, props=137546065, risky=0) at xdisp.c:16133
#14 0x080a95a4 in display_mode_line (w=0x9523698, face_id=MODE_LINE_FACE_ID, format=137940117) at xdisp.c:15695
#15 0x080a94d6 in display_mode_lines (w=0x9523698) at xdisp.c:15644
#16 0x080a3738 in redisplay_window (window=156382876, just_this_one_p=0) at xdisp.c:12518
#17 0x080a10e9 in redisplay_window_0 (window=156382876) at xdisp.c:10962
#18 0x0816cb4c in internal_condition_case_1 (bfun=0x80a10bc <redisplay_window_0>, arg=156382876, handlers=137573669, hfun=0x80a10a0 <redisplay_window_error>) at eval.c:1430
#19 0x080a109c in redisplay_windows (window=137545984) at xdisp.c:10941
#20 0x080a0571 in redisplay_internal (preserve_echo_area=1) at xdisp.c:10500
#21 0x080a0ce7 in redisplay_preserve_echo_area (from_where=13) at xdisp.c:10748
#22 0x0819d600 in status_notify () at process.c:6506
#23 0x0819b1a2 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=137546065, wait_proc=0x0, just_wait_proc=0) at process.c:4223
#24 0x0808bf3c in sit_for (sec=30, usec=0, reading=1, display=1, initial_display=0) at dispnew.c:6373
#25 0x08115fa6 in read_char (commandflag=1, nmaps=4, maps=0xbfe8c0a0, prev_event=137546065, used_mouse_menu=0xbfe8c0d8) at keyboard.c:2764
#26 0x0811c2ab in read_key_sequence (keybuf=0xbfe8c200, bufsize=30, prompt=137546065, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:8818
#27 0x081133d4 in command_loop_1 () at keyboard.c:1527
#28 0x0816ca52 in internal_condition_case (bfun=0x811324c <command_loop_1>, handlers=137607041, hfun=0x8112dd0 <cmd_error>) at eval.c:1389
#29 0x081130ce in command_loop_2 () at keyboard.c:1318
#30 0x0816c5b1 in internal_catch (tag=137545856, func=0x81130b0 <command_loop_2>, arg=137546065) at eval.c:1148
#31 0x08113085 in command_loop () at keyboard.c:1297
#32 0x08112b88 in recursive_edit_1 () at keyboard.c:990
#33 0x08112ca8 in Frecursive_edit () at keyboard.c:1051
#34 0x081114b1 in main (argc=3, argv=0xbfe8c814) at emacs.c:1775
(gdb) p string_start
$3 = 0x8522930 "\220P\360\tP\355\343\tw3m*<2>    / Excite \222\245\250\222\245\255\222\245\265\222\245\244\222\245\310 \222\313\335\222\314\365 : \222\261\321\222\270\354\222\313\335\222\314\365 \222\303\346\222\271\361\222\270\354\222\313\335\222\314\365 \222\264\332\222\271\361\222\270\354\222\313\335\222\314h"
(gdb) p mode_line_noprop_ptr
$4 = 0x97365eb ""
(gdb) p mode_line_noprop_ptr - string_start
$5 = 18955451
(gdb) p no_props
$6 = 1
(gdb) up
#3  0x0816db28 in Feval (form=136136992) at eval.c:2133
(gdb) down
#2  0x080aa3a1 in Fformat_mode_line (format=137940117, face=137546065, window=139602224, buffer=-1075272656) at xdisp.c:16366
(gdb) pp format
(#("-" 0 1 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")) mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification #("   " 0 3 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")) mode-line-position (vc-mode vc-mode) #("   " 0 3 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")) mode-line-modes (which-func-mode ("" which-func-format #("--" 0 2 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")))) (global-mode-string (#("--" 0 2 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")) global-mode-string)) #("-%-" 0 3 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")))
(gdb) 


    (defun w3m-modeline-title ()
      "Return a truncated title not to cut the right end of the mode line.
    It currently works only with Emacs 22 and newer."
      (when w3m-current-title
	(or (and w3m-modeline-title-timer w3m-modeline-title-string)
	    (prog2
		(setq w3m-modeline-title-string w3m-current-title
		      w3m-modeline-title-timer t)
		(let ((excess (- (string-width
				  (condition-case nil
				      (format-mode-line mode-line-format 1)
				    (error "")))
				    ...