From unknown Sat Jun 21 10:40:14 2025 X-Loop: don@donarmstrong.com Subject: bug#891: 23.0.60; Emacs aborts after buffer-swap-text Reply-To: Stephen Berman , 891@debbugs.gnu.org Resent-From: Stephen Berman Original-Sender: steve@escher.local.home Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 04 Sep 2008 22:40:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122056764123624 (code B ref -1); Thu, 04 Sep 2008 22:40:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.7 required=4.0 tests=AWL,BAYES_00,FOURLA, IMPRONONCABLE_2,PHONENUMBER,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 22:34:01 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84MXrgn023618 for ; Thu, 4 Sep 2008 15:33:55 -0700 Received: from mail.gnu.org ([199.232.76.166]:55573 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KbNN7-0000Sp-9O for emacs-pretest-bug@gnu.org; Thu, 04 Sep 2008 18:32:13 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KbNOb-0004Ce-R2 for emacs-pretest-bug@gnu.org; Thu, 04 Sep 2008 18:33:52 -0400 Received: from mail.gmx.net ([213.165.64.20]:40208) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KbNOa-0004CI-R9 for emacs-pretest-bug@gnu.org; Thu, 04 Sep 2008 18:33:45 -0400 Received: (qmail invoked by alias); 04 Sep 2008 22:33:42 -0000 Received: from i5387D848.versanet.de (EHLO escher.local.home) [83.135.216.72] by mail.gmx.net (mp067) with SMTP; 05 Sep 2008 00:33:42 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19ju/h/XQtjW5jS6fQSGYMqiroKZYI6M9dhU0SmJG dQZrfAwR8eq8az Received: by escher.local.home (Postfix, from userid 1000) id 54EA41D0F66; Fri, 5 Sep 2008 00:33:41 +0200 (CEST) From: Stephen Berman To: emacs-pretest-bug@gnu.org Sender: steve@escher.local.home Date: Fri, 05 Sep 2008 00:33:41 +0200 Message-ID: <871vzzczi2.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: 1. emacs -Q 2. Load the library tabbar.el, available from http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup 3. M-x tabbar-mode 4. M-: (buffer-swap-text (get-buffer "*Messages*")) 5. C-c C-right (tabbar-forward) ==> Emacs aborts The full backtrace is below. According to the Lisp backtrace, the abort occurs during or after switch-to-buffer. Yet typing C-x b after step 4 above does not make Emacs abort. Moreover, when I directly call any of the tabbar.el functions listed in the backtrace and step through them with edebug, this also fails to make Emacs abort. Yet the above recipe is reliably reproducible. (Since the abort occurs in unshow_buffer, my guess, based on a comment at line 8314 of xdisp.c, is that switch-to-buffer needs to have something like the code in with_echo_area_buffer that changes w->pointm. I guess this would go after the call to Fset_buffer in switch-to-buffer, but I don't know how to write the code.) (gdb) r -Q -fn "Dejavu Sans Mono-10" `/Users/steve/lib/emacs-cvs-gtk/src/emacs' has changed; re-reading symbols. Breakpoint 1 at 0x8116c06: file /home/steve/cvsroot/emacs/src/emacs.c, line 417. Breakpoint 2 at 0x8130f89: file /Users/steve/cvsroot/emacs/src/sysdep.c, line 1135. Starting program: /Users/steve/lib/emacs-cvs-gtk/src/emacs -Q -fn "Dejavu Sans Mono-10" Breakpoint 1, abort () at /home/steve/cvsroot/emacs/src/emacs.c:417 417 kill (getpid (), SIGABRT); (gdb) bt full #0 abort () at /home/steve/cvsroot/emacs/src/emacs.c:417 No locals. #1 0x08096ebb in unshow_buffer (w=0x8c5a3b0) at /home/steve/cvsroot/emacs/src/window.c:1392 buf = 139270356 #2 0x0809a158 in Fset_window_buffer (window=147170228, buffer=141881804, keep_margins=137857225) at /home/steve/cvsroot/emacs/src/window.c:3497 tem = w = (struct window *) 0x8c5a3b0 #3 0x08139c9b in switch_to_buffer_1 (buffer=141881804, norecord=137857225) at /home/steve/cvsroot/emacs/src/buffer.c:1766 buf = 141881804 #4 0x081802c1 in Feval (form=147885501) at /Users/steve/cvsroot/emacs/src/eval.c:2378 numargs = argvals = {141881804, 137857225, 0, 148096029, -1080555584, -1080555720, -1080555776, 2} args_left = 137857225 i = 2 fun = val = original_fun = 138019601 original_args = 147885469 funcar = backtrace = { next = 0xbf9807c0, function = 0xbf980748, args = 0xbf980710, nargs = 1, evalargs = 1 '\001', debug_on_exit = 0 '\0' } #5 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #6 0x08180383 in Feval (form=147886349) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {148096829, 148320841, -1080555480, 135790656, -1080555456, -1080555576, -1080555680, 2} args_left = 147885965 ---Type to continue, or q to quit--- i = fun = val = original_fun = 137996201 original_args = 147885965 funcar = backtrace = { next = 0xbf9808a0, function = 0xbf9807d8, args = 0xbf9807d4, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #7 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #8 0x08182a8f in Flet (args=147886389) at /Users/steve/cvsroot/emacs/src/eval.c:1089 tem = 141881804 elt = varlist = #9 0x08180383 in Feval (form=147887125) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {208, 148290853, -1080555424, -1080555312, 148246920, 13, 142318232, 5} args_left = 147886389 i = fun = val = original_fun = 137998577 original_args = 147886389 funcar = backtrace = { next = 0xbf980968, function = 0xbf9808b8, args = 0xbf9808b4, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' ---Type to continue, or q to quit--- } #10 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #11 0x08180804 in funcall_lambda (fun=147884632, nargs=2, arg_vector=0xbf9809b4) at /Users/steve/cvsroot/emacs/src/eval.c:3224 val = syms_left = 137857225 next = i = 2 optional = 0 rest = 0 #12 0x08180b3f in Ffuncall (nargs=3, args=0xbf9809b0) at /Users/steve/cvsroot/emacs/src/eval.c:3101 fun = 147884637 original_fun = 142818729 funcar = numargs = 2 val = backtrace = { next = 0xbf980a00, function = 0xbf9809b0, args = 0xbf9809b4, nargs = 2, evalargs = 0 '\0', debug_on_exit = 0 '\0' } internal_args = (Lisp_Object *) 0xbf9809b4 i = #13 0x08180370 in Feval (form=148243701) at /Users/steve/cvsroot/emacs/src/eval.c:2348 numargs = argvals = {224, 148096029, 15, 136329824, 136329832, 14, 142318232, 148135861} args_left = 137857225 i = fun = val = original_fun = 137998889 original_args = 148243709 funcar = ---Type to continue, or q to quit--- backtrace = { next = 0xbf980a90, function = 0xbf980a18, args = 0xbf9809b0, nargs = 3, evalargs = 1 '\001', debug_on_exit = 0 '\0' } #14 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #15 0x08180383 in Feval (form=148290925) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {136329944, 148135861, 137998601, 148134112, 137499040, 0, -1080554944, 136329923} args_left = 148290933 i = fun = val = original_fun = 137996225 original_args = 148290933 funcar = backtrace = { next = 0xbf980b10, function = 0xbf980aa8, args = 0xbf980aa4, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #16 0x08180383 in Feval (form=148290901) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {136329756, 142824729, 148243701, 148243757, 148243693, 148096445, 138010225, 148096480} args_left = 148290909 i = fun = val = original_fun = 137996177 ---Type to continue, or q to quit--- original_args = 148290909 funcar = backtrace = { next = 0xbf980b90, function = 0xbf980b28, args = 0xbf980b24, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #17 0x08180130 in Feval (form=148243685) at /Users/steve/cvsroot/emacs/src/eval.c:2433 numargs = argvals = {137857225, 137969097, 5, 148300117, 148300269, 138229905, -1080554488, 135790656} args_left = i = fun = val = original_fun = 138020321 original_args = 148243693 funcar = backtrace = { next = 0xbf980cb0, function = 0xbf980ba8, args = 0xbf980ba4, nargs = -1, evalargs = 1 '\001', debug_on_exit = 0 '\0' } #18 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #19 0x08180804 in funcall_lambda (fun=148243888, nargs=2, arg_vector=0xbf980c20) at /Users/steve/cvsroot/emacs/src/eval.c:3224 val = syms_left = 137857225 next = i = 2 optional = 1 rest = 0 ---Type to continue, or q to quit--- #20 0x08180920 in apply_lambda (fun=148243893, args=148300445, eval_flag=1) at /Users/steve/cvsroot/emacs/src/eval.c:3155 args_left = 137857225 arg_vector = (Lisp_Object *) 0x83788c9 i = 2 tem = 137857225 #21 0x0817ffd4 in Feval (form=148300437) at /Users/steve/cvsroot/emacs/src/eval.c:2435 fun = 137857225 val = original_fun = 142868745 original_args = 148300445 funcar = 137857273 backtrace = { next = 0xbf980d40, function = 0xbf980cc8, args = 0xbf980c20, nargs = 2, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #22 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #23 0x08180383 in Feval (form=148291021) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {139575457, 148291101, -1080554072, 135790656, -1080554048, -1080554168, 136329752, 2} args_left = 148291029 i = fun = val = original_fun = 137996225 original_args = 148291029 funcar = backtrace = { next = 0xbf980dc0, function = 0xbf980d58, args = 0xbf980d54, nargs = -1, ---Type to continue, or q to quit--- evalargs = 0 '\0', debug_on_exit = 0 '\0' } #24 0x08180383 in Feval (form=148290997) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {148300437, 136329756, -1080554024, 135799515, 148301381, -1080554032, -1080553992, 135792928} args_left = 148291005 i = fun = val = original_fun = 137996177 original_args = 148291005 funcar = backtrace = { next = 0xbf980e40, function = 0xbf980dd8, args = 0xbf980dd4, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #25 0x08180130 in Feval (form=148301373) at /Users/steve/cvsroot/emacs/src/eval.c:2433 numargs = argvals = {137897993, 137900042, 3, 139270352, -1080553884, 2, 137857249, 137897992} args_left = i = fun = val = original_fun = 138020321 original_args = 148301381 funcar = backtrace = { next = 0xbf980f00, function = 0xbf980e58, args = 0xbf980e54, nargs = -1, evalargs = 1 '\001', ---Type to continue, or q to quit--- debug_on_exit = 0 '\0' } #26 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #27 0x08182c25 in FletX (args=148301365) at /Users/steve/cvsroot/emacs/src/eval.c:1033 varlist = 137857225 val = 137857225 elt = 137969097 #28 0x08180383 in Feval (form=148301085) at /Users/steve/cvsroot/emacs/src/eval.c:2322 numargs = 137857273 argvals = {137012732, 4, 142318232, 4, 0, 0, 0, -1080553696} args_left = 148301365 i = fun = val = original_fun = 137998601 original_args = 148301365 funcar = backtrace = { next = 0xbf981010, function = 0xbf980f18, args = 0xbf980f14, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #29 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #30 0x08180804 in funcall_lambda (fun=148300480, nargs=0, arg_vector=0xbf980f90) at /Users/steve/cvsroot/emacs/src/eval.c:3224 val = syms_left = 137857225 next = i = 0 optional = 1 rest = 0 #31 0x08180920 in apply_lambda (fun=148300485, args=137857225, eval_flag=1) ---Type to continue, or q to quit--- at /Users/steve/cvsroot/emacs/src/eval.c:3155 args_left = 0 arg_vector = (Lisp_Object *) 0x83788c9 i = 0 tem = 137857225 #32 0x0817ffd4 in Feval (form=148300653) at /Users/steve/cvsroot/emacs/src/eval.c:2435 fun = 137857225 val = original_fun = 142869129 original_args = 137857225 funcar = 137857273 backtrace = { next = 0xbf9810d8, function = 0xbf981028, args = 0xbf980f90, nargs = 0, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #33 0x0818056f in Fprogn (args=137857273) at /Users/steve/cvsroot/emacs/src/eval.c:449 val = 137857225 #34 0x08180804 in funcall_lambda (fun=148300664, nargs=0, arg_vector=0xbf981114) at /Users/steve/cvsroot/emacs/src/eval.c:3224 val = syms_left = 137857225 next = i = 0 optional = 0 rest = 138140528 #35 0x08180b3f in Ffuncall (nargs=1, args=0xbf981110) at /Users/steve/cvsroot/emacs/src/eval.c:3101 fun = 148300669 original_fun = 142869249 funcar = numargs = 0 val = backtrace = { next = 0xbf981278, function = 0xbf981110, ---Type to continue, or q to quit--- args = 0xbf981114, nargs = 0, evalargs = 0 '\0', debug_on_exit = 0 '\0' } internal_args = (Lisp_Object *) 0xbf981114 i = #36 0x081824c9 in apply1 (fn=142869249, arg=137857225) at /Users/steve/cvsroot/emacs/src/eval.c:2785 ret_ungc_val = 139270352 #37 0x0817cbb4 in Fcall_interactively (function=142869249, record_flag=137857225, keys=137895660) at /Users/steve/cvsroot/emacs/src/callint.c:389 values = 0 input = args = visargs = specs = 137857225 filter_specs = teml = up_event = enable = 137857225 next_event = prefix_arg = 137857225 string = tem = varies = i = j = foo = prompt1 = '\0' , " ", '\0' arg_from_tty = key_count = 2 record_then_fail = save_this_command = 142869249 save_last_command = 143064897 save_this_original_command = 142869249 save_real_this_command = 142869249 #38 0x08180d89 in Ffuncall (nargs=4, args=0xbf9812b0) at /Users/steve/cvsroot/emacs/src/eval.c:3050 fun = ---Type to continue, or q to quit--- original_fun = funcar = numargs = 3 val = backtrace = { next = 0x0, function = 0xbf9812b0, args = 0xbf9812b4, nargs = 3, evalargs = 0 '\0', debug_on_exit = 0 '\0' } internal_args = (Lisp_Object *) 0xbf9812b4 i = #39 0x08180ed9 in call3 (fn=138021481, arg1=142869249, arg2=137857225, arg3=137857225) at /Users/steve/cvsroot/emacs/src/eval.c:2874 ret_ungc_val = 139270352 #40 0x08127d6e in command_loop_1 () at /home/steve/cvsroot/emacs/src/keyboard.c:1879 cmd = lose = nonundocount = 0 keybuf = {24, 143064993, 135408094, 141287205, 137857273, -1080552662, 137857225, -1080552624, 137857225, -1080552600, 135408352, 141287205, -1080552662, 0, -1219210608, -1220685348, 0, 0, -1208525780, 0, -1080552632, -1080552784, 0, -1220673536, 137857225, 143204425, 0, 138380480, 138380464, -1080552600} i = prev_modiff = 5 prev_buffer = (struct buffer *) 0x84d18d0 already_adjusted = 0 #41 0x0817f670 in internal_condition_case (bfun=0x8127a10 , handlers=137900465, hfun=0x8122a30 ) at /Users/steve/cvsroot/emacs/src/eval.c:1511 val = c = { tag = 137857225, val = 137857225, next = 0xbf981490, gcpro = 0x0, jmp = {{ ---Type to continue, or q to quit--- __jmpbuf = {0, 138380480, 138380464, -1080552360, -919785769, -689459784}, __mask_was_saved = 0, __saved_mask = { __val = {1, 3075522548, 1617, 3075522548, 147162920, 147162920, 3214414464, 3214414872, 3214414928, 3086452336, 134545314, 2822930839, 0, 0, 3075473410, 3086398473, 134544643, 3214414864, 3214415152, 4294967295, 3214415000, 135464899, 3214415152, 3214414864, 128, 3074312832, 3075756688, 0, 4294967295, 3086450676, 3086452336, 134523856} } }}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0 } h = { handler = 137900465, var = 137857225, chosen_clause = 137857273, tag = 0xbf98137c, next = 0x0 } #42 0x08121f83 in command_loop_2 () at /home/steve/cvsroot/emacs/src/keyboard.c:1338 val = 139270352 #43 0x0817f74a in internal_catch (tag=137896441, func=0x8121f60 , arg=137857225) at /Users/steve/cvsroot/emacs/src/eval.c:1247 c = { tag = 137896441, val = 137857225, next = 0x0, gcpro = 0x0, jmp = {{ __jmpbuf = {0, 138380480, 138380464, -1080552104, -920465705, -689588808}, ---Type to continue, or q to quit--- __mask_was_saved = 0, __saved_mask = { __val = {0 , 3074707950, 0, 0, 0, 0, 0, 0, 0, 138096610, 138096040, 138096608, 3214415176, 135730245, 138096041, 138096610, 137857225, 137883080, 0, 0, 137857249} } }}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0 } #44 0x08122897 in command_loop () at /home/steve/cvsroot/emacs/src/keyboard.c:1317 No locals. #45 0x08122bfb in recursive_edit_1 () at /home/steve/cvsroot/emacs/src/keyboard.c:942 val = #46 0x08122d31 in Frecursive_edit () at /home/steve/cvsroot/emacs/src/keyboard.c:1004 buffer = 137857225 #47 0x081179dc in main (argc=4, argv=0xbf981964) at /home/steve/cvsroot/emacs/src/emacs.c:1693 displayname = 0x0 count_before = dummy = -1080551208 stack_bottom_variable = 8 '\b' do_initial_setlocale = 1 skip_args = 0 rlim = { rlim_cur = 8388608, rlim_max = 18446744073709551615 } no_loadup = 0 junk = 0x0 Lisp Backtrace: "switch-to-buffer" (0xbf980710) ---Type to continue, or q to quit--- "cond" (0xbf9807d4) "let" (0xbf9808b4) "tabbar-buffer-select-tab" (0xbf9809b4) "funcall" (0xbf9809b0) "progn" (0xbf980aa4) "if" (0xbf980b24) "when" (0xbf980ba4) "tabbar-click-on-tab" (0xbf980c20) "progn" (0xbf980d54) "if" (0xbf980dd4) "when" (0xbf980e54) "let*" (0xbf980f14) "tabbar-cycle" (0xbf980f90) "tabbar-forward" (0xbf981114) "call-interactively" (0xbf9812b4) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/23.0.60/etc/DEBUG for instructions. In GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2008-09-04 on escher Windowing system distributor `The X.Org Foundation', version 11.0.70200000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: eldoc-mode: t shell-dirtrack-mode: t show-paren-mode: t recentf-mode: t diff-auto-refine-mode: t tabbar-mwheel-mode: t tabbar-mode: t display-time-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: y M-x g u y J j y M-g 2 0 SPC n n SPC n SPC n u SPC SPC q M-x c v s e x c v e m / e C-h e C-c j M-u q M-x s h e c d SPC . . . . / . . / l i b c v e m / C-x d SPC ~ / c v e s C-x k C-c j p c o n u C-c j i C-x b m a k e C-r e r r o C-g C-r w a r n C-w C-r C-r C-r C-g C-x d i g g d x y e s C-x C-f ~ / C-g M-x e d s i t a b b M-x r e p o r Recent messages: Partially completed Completing file name... Partially completed Ido mode enabled [2 times] Quit [2 times] Mark set 1 of 1 deletions 1 deletion done Quit Making completion list... From unknown Sat Jun 21 10:40:14 2025 X-Loop: don@donarmstrong.com Subject: bug#891: 23.0.60; Emacs aborts after buffer-swap-text Reply-To: Jason Rumney , 891@debbugs.gnu.org Resent-From: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 04 Sep 2008 23:15:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 891-submit@emacsbugs.donarmstrong.com id=B891.12205696783696 (code B ref 891); Thu, 04 Sep 2008 23:15:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 891) by emacsbugs.donarmstrong.com; 4 Sep 2008 23:07:58 +0000 Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84N7mDp003587; Thu, 4 Sep 2008 16:07:50 -0700 X-Trace: 23049994/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250 X-SBRS: None X-RemoteIP: 124.82.237.250 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocBADIHwEh8Uu36/2dsb2JhbAAIsQqHAYFl X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; d="scan'208";a="23049994" X-IP-Direction: OUT Received: from unknown (HELO [172.16.0.17]) ([124.82.237.250]) by smtp.f2s.tiscali.co.uk with ESMTP; 05 Sep 2008 00:07:41 +0100 Message-ID: <48C06A11.10805@gnu.org> Date: Fri, 05 Sep 2008 07:06:57 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman , 891@debbugs.gnu.org References: <871vzzczi2.fsf@escher.local.home> In-Reply-To: <871vzzczi2.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit merge 891 716 reassign 716 emacs reassign 805 emacs thanks Stephen Berman wrote: > 1. emacs -Q > 2. Load the library tabbar.el, available from > http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup > 3. M-x tabbar-mode > 4. M-: (buffer-swap-text (get-buffer "*Messages*")) > 5. C-c C-right (tabbar-forward) > ==> Emacs aborts > This seems to be the same bug as has been happening with tar-mode on Windows since tar-mode was changed to use buffer-swap-text. So the underlying bug is not platform specific after all. Do you also get crashes when opening tar files in Emacs? > The full backtrace is below. According to the Lisp backtrace, the abort > occurs during or after switch-to-buffer. Yet typing C-x b after step 4 > above does not make Emacs abort. Moreover, when I directly call any of > the tabbar.el functions listed in the backtrace and step through them > with edebug, this also fails to make Emacs abort. Yet the above recipe > is reliably reproducible. > > (Since the abort occurs in unshow_buffer, my guess, based on a comment > at line 8314 of xdisp.c, is that switch-to-buffer needs to have > something like the code in with_echo_area_buffer that changes w->pointm. > I guess this would go after the call to Fset_buffer in switch-to-buffer, > but I don't know how to write the code.) > Can this be done in Fbuffer_swap_text, rather than expecting other code to clean up after the fact? Some of the crashes I've seen while debugging this have not involved switch-to-buffer, so there are probably many other locations where this clean up code needs to go if it can't be done in Fbuffer_swap_text for some reason. From unknown Sat Jun 21 10:40:14 2025 X-Loop: don@donarmstrong.com Subject: bug#891: 23.0.60; Emacs aborts after buffer-swap-text Reply-To: Stefan Monnier , 891@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Sep 2008 04:00:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12205867984301 (code B ref -1); Fri, 05 Sep 2008 04:00:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,BAYES_00,FOURLA, FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 03:53:18 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m853rE6m004295 for ; Thu, 4 Sep 2008 20:53:15 -0700 Received: from mail.gnu.org ([199.232.76.166]:48818 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KbSM9-0004u3-Vi for emacs-pretest-bug@gnu.org; Thu, 04 Sep 2008 23:51:34 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KbSNj-0002UO-OW for emacs-pretest-bug@gnu.org; Thu, 04 Sep 2008 23:53:14 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:65000 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbSNj-0002Tk-Gb for emacs-pretest-bug@gnu.org; Thu, 04 Sep 2008 23:53:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhoFAHRKwEhFxJRU/2dsb2JhbACBZbVIgWWBBg X-IronPort-AV: E=Sophos;i="4.32,320,1217822400"; d="scan'208";a="26376615" Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84]) by ironport2-out.teksavvy.com with ESMTP; 04 Sep 2008 23:52:46 -0400 Received: by ceviche.home (Postfix, from userid 20848) id E9C43B405D; Thu, 4 Sep 2008 23:52:45 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Cc: 891@debbugs.gnu.org, emacs-pretest-bug@gnu.org Message-ID: References: <871vzzczi2.fsf@escher.local.home> Date: Thu, 04 Sep 2008 23:52:45 -0400 In-Reply-To: <871vzzczi2.fsf@escher.local.home> (Stephen Berman's message of "Fri, 05 Sep 2008 00:33:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. > 1. emacs -Q > 2. Load the library tabbar.el, available from > http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup > 3. M-x tabbar-mode > 4. M-: (buffer-swap-text (get-buffer "*Messages*")) > 5. C-c C-right (tabbar-forward) > ==> Emacs aborts > The full backtrace is below. According to the Lisp backtrace, the abort > occurs during or after switch-to-buffer. Yet typing C-x b after step 4 > above does not make Emacs abort. Moreover, when I directly call any of > the tabbar.el functions listed in the backtrace and step through them > with edebug, this also fails to make Emacs abort. Yet the above recipe > is reliably reproducible. > (Since the abort occurs in unshow_buffer, my guess, based on a comment > at line 8314 of xdisp.c, is that switch-to-buffer needs to have > something like the code in with_echo_area_buffer that changes w->pointm. > I guess this would go after the call to Fset_buffer in switch-to-buffer, > but I don't know how to write the code.) Does the patch below fix the crash you see? Stefan === modified file 'src/buffer.c' --- src/buffer.c 2008-08-29 15:11:08 +0000 +++ src/buffer.c 2008-09-05 03:51:15 +0000 @@ -2250,6 +2250,27 @@ if (m->buffer == current_buffer) m->buffer = other_buffer; } + /* Some of the C code expects that w->buffer == w->pointm->buffer. + So since we just swapped the markers between the two buffers, we need + to undo the effect of this swap for window markers. */ + { + Lisp_Object w = Fselected_window (), ws = Qnil; + Lisp_Object buf1, buf2; + XSETBUFFER (buf1, current_buffer); XSETBUFFER (buf2, other_buffer); + + while (NILP (Fmemq (w, ws))) + { + ws = Fcons (w, ws); + if ((EQ (XWINDOW (w)->buffer, buf1) + || EQ (XWINDOW (w)->buffer, buf2)) + && MARKERP (XWINDOW (w)->pointm)) + Fset_marker (XWINDOW (w)->pointm, + make_number (BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))), + XWINDOW (w)->buffer); + w = Fnext_window (w, Qt, Qt); + } + } + if (current_buffer->text->intervals) (eassert (EQ (current_buffer->text->intervals->up.obj, buffer)), XSETBUFFER (current_buffer->text->intervals->up.obj, current_buffer)); From unknown Sat Jun 21 10:40:14 2025 X-Loop: don@donarmstrong.com Subject: bug#891: 23.0.60; Emacs aborts after buffer-swap-text Reply-To: Stephen Berman , 891@debbugs.gnu.org Resent-From: Stephen Berman Original-Sender: steve@escher.local.home Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Sep 2008 08:40:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12206035383784 (code B ref -1); Fri, 05 Sep 2008 08:40:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 08:32:18 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m858WFRv003773 for ; Fri, 5 Sep 2008 01:32:16 -0700 Received: from mx10.gnu.org ([199.232.76.166]:35067) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KbWiA-0004ah-EE for emacs-pretest-bug@gnu.org; Fri, 05 Sep 2008 04:30:34 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KbWji-0003iN-TB for emacs-pretest-bug@gnu.org; Fri, 05 Sep 2008 04:32:14 -0400 Received: from mail.gmx.net ([213.165.64.20]:51393) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KbWji-0003i3-AE for emacs-pretest-bug@gnu.org; Fri, 05 Sep 2008 04:32:10 -0400 Received: (qmail invoked by alias); 05 Sep 2008 08:32:08 -0000 Received: from i5387E109.versanet.de (EHLO escher.local.home) [83.135.225.9] by mail.gmx.net (mp029) with SMTP; 05 Sep 2008 10:32:08 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18ALzIAB64APwYmWi+gIDSkxOQx1uEl+YTeo3VCOm M1S/A1KME9WRKK Received: by escher.local.home (Postfix, from userid 1000) id 35D7A1D10A5; Fri, 5 Sep 2008 10:32:07 +0200 (CEST) From: Stephen Berman To: Stefan Monnier Cc: 891@debbugs.gnu.org, emacs-pretest-bug@gnu.org References: <871vzzczi2.fsf@escher.local.home> Sender: steve@escher.local.home Date: Fri, 05 Sep 2008 10:32:07 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 04 Sep 2008 23:52:45 -0400") Message-ID: <87iqtbgfi0.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) On Thu, 04 Sep 2008 23:52:45 -0400 Stefan Monnier wrote: >> 1. emacs -Q >> 2. Load the library tabbar.el, available from >> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup >> 3. M-x tabbar-mode >> 4. M-: (buffer-swap-text (get-buffer "*Messages*")) >> 5. C-c C-right (tabbar-forward) >> ==> Emacs aborts > >> The full backtrace is below. According to the Lisp backtrace, the abort >> occurs during or after switch-to-buffer. Yet typing C-x b after step 4 >> above does not make Emacs abort. Moreover, when I directly call any of >> the tabbar.el functions listed in the backtrace and step through them >> with edebug, this also fails to make Emacs abort. Yet the above recipe >> is reliably reproducible. > >> (Since the abort occurs in unshow_buffer, my guess, based on a comment >> at line 8314 of xdisp.c, is that switch-to-buffer needs to have >> something like the code in with_echo_area_buffer that changes w->pointm. >> I guess this would go after the call to Fset_buffer in switch-to-buffer, >> but I don't know how to write the code.) > > Does the patch below fix the crash you see? Yes; thanks! Steve Berman From unknown Sat Jun 21 10:40:14 2025 X-Loop: don@donarmstrong.com Subject: bug#891: 23.0.60; Emacs aborts after buffer-swap-text Reply-To: Stephen Berman , 891@debbugs.gnu.org Resent-From: Stephen Berman Original-Sender: steve@escher.local.home Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Sep 2008 08:40:08 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 891-submit@emacsbugs.donarmstrong.com id=B891.12206035513792 (code B ref 891); Fri, 05 Sep 2008 08:40:08 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 891) by emacsbugs.donarmstrong.com; 5 Sep 2008 08:32:31 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m858WS0K003785 for <891@emacsbugs.donarmstrong.com>; Fri, 5 Sep 2008 01:32:29 -0700 Received: (qmail invoked by alias); 05 Sep 2008 08:32:22 -0000 Received: from i5387E109.versanet.de (EHLO escher.local.home) [83.135.225.9] by mail.gmx.net (mp008) with SMTP; 05 Sep 2008 10:32:22 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/gwbUN7f/gRe0FjXwYJYMzRzdksMe94w7uic6n5P angTjWRD9q9I0h Received: by escher.local.home (Postfix, from userid 1000) id 4675D1D10A5; Fri, 5 Sep 2008 10:32:21 +0200 (CEST) From: Stephen Berman To: Jason Rumney Cc: 891@debbugs.gnu.org References: <871vzzczi2.fsf@escher.local.home> <48C06A11.10805@gnu.org> Sender: steve@escher.local.home Date: Fri, 05 Sep 2008 10:32:21 +0200 In-Reply-To: <48C06A11.10805@gnu.org> (Jason Rumney's message of "Fri, 05 Sep 2008 07:06:57 +0800") Message-ID: <87hc8vgfhm.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 On Fri, 05 Sep 2008 07:06:57 +0800 Jason Rumney wrote: > merge 891 716 > reassign 716 emacs > reassign 805 emacs > thanks > > Stephen Berman wrote: >> 1. emacs -Q >> 2. Load the library tabbar.el, available from >> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup >> 3. M-x tabbar-mode >> 4. M-: (buffer-swap-text (get-buffer "*Messages*")) >> 5. C-c C-right (tabbar-forward) >> ==> Emacs aborts >> > > This seems to be the same bug as has been happening with tar-mode on Windows > since tar-mode was changed to use buffer-swap-text. So the underlying bug is > not platform specific after all. Do you also get crashes when opening tar > files in Emacs? No, opening a .tar, .tar.gz, or .tgz file works fine here (before applying Stefan's patch). I also could not reproduce the crash with your recipe in the 716 thread. So I guess there are still some platform specific issues. Steve Berman From unknown Sat Jun 21 10:40:14 2025 X-Loop: don@donarmstrong.com Subject: bug#891: 23.0.60; Emacs aborts after buffer-swap-text Reply-To: Jason Rumney , 891@debbugs.gnu.org Resent-From: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Sep 2008 10:05:10 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 891-submit@emacsbugs.donarmstrong.com id=B891.1220608709449 (code B ref 891); Fri, 05 Sep 2008 10:05:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 891) by emacsbugs.donarmstrong.com; 5 Sep 2008 09:58:29 +0000 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m859wKcV000443; Fri, 5 Sep 2008 02:58:21 -0700 X-Trace: 78811840/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130 X-SBRS: None X-RemoteIP: 61.4.103.130 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgBAP+fwEg9BGeC/2dsb2JhbAAIsDaGbYFl X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; d="scan'208";a="78811840" X-IP-Direction: OUT Received: from unknown (HELO [10.1.1.113]) ([61.4.103.130]) by smtp.f2s.tiscali.co.uk with ESMTP; 05 Sep 2008 10:58:12 +0100 Message-ID: <48C10284.7090103@gnu.org> Date: Fri, 05 Sep 2008 17:57:24 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 891@debbugs.gnu.org References: <871vzzczi2.fsf@escher.local.home> <48C06A11.10805@gnu.org> <87hc8vgfhm.fsf@escher.local.home> In-Reply-To: <87hc8vgfhm.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit unmerge 891 thanks Stephen Berman wrote: > On Fri, 05 Sep 2008 07:06:57 +0800 Jason Rumney wrote: > >> Stephen Berman wrote: >> >>> 1. emacs -Q >>> 2. Load the library tabbar.el, available from >>> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup >>> 3. M-x tabbar-mode >>> 4. M-: (buffer-swap-text (get-buffer "*Messages*")) >>> 5. C-c C-right (tabbar-forward) >>> ==> Emacs aborts >>> >>> >> This seems to be the same bug as has been happening with tar-mode on Windows >> since tar-mode was changed to use buffer-swap-text. So the underlying bug is >> not platform specific after all. Do you also get crashes when opening tar >> files in Emacs? >> > > No, opening a .tar, .tar.gz, or .tgz file works fine here (before > applying Stefan's patch). I also could not reproduce the crash with > your recipe in the 716 thread. So I guess there are still some platform > specific issues. > Stefan's patch does not help with the tar-mode crashes, so I guess this is a different bug after all.