From unknown Tue Jun 17 20:17:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11917 <11917@debbugs.gnu.org> To: bug#11917 <11917@debbugs.gnu.org> Subject: Status: 24.1.50; Segfault in with make-local-variable and indirect buffers Reply-To: bug#11917 <11917@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:17:42 +0000 retitle 11917 24.1.50; Segfault in with make-local-variable and indirect bu= ffers reassign 11917 emacs submitter 11917 Matthew Woodcraft severity 11917 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 11 17:46:40 2012 Received: (at submit) by debbugs.gnu.org; 11 Jul 2012 21:46:40 +0000 Received: from localhost ([127.0.0.1]:34097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sp4k3-0002xE-VM for submit@debbugs.gnu.org; Wed, 11 Jul 2012 17:46:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44914) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sp4VX-0002bc-5b for submit@debbugs.gnu.org; Wed, 11 Jul 2012 17:31:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sp4QC-0004FT-H7 for submit@debbugs.gnu.org; Wed, 11 Jul 2012 17:26:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp4QC-0004FO-D9 for submit@debbugs.gnu.org; Wed, 11 Jul 2012 17:26:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp4QA-0004uw-T1 for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 17:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sp4Q9-0004Ex-7Z for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 17:26:06 -0400 Received: from hark.woodcraft.me.uk ([80.68.94.88]:38648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp4Q8-0004Ef-V3 for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 17:26:05 -0400 Received: from cpc3-cmbg10-0-0-cust455.5-4.cable.virginmedia.com ([81.102.141.200] helo=golux.woodcraft.me.uk) by hark.woodcraft.me.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Sp4Q2-0008DL-5f; Wed, 11 Jul 2012 22:25:58 +0100 Received: from mjw by golux.woodcraft.me.uk with local (Exim 4.80) (envelope-from ) id 1Sp4Q1-0004vR-6h; Wed, 11 Jul 2012 22:25:57 +0100 From: Matthew Woodcraft To: bug-gnu-emacs@gnu.org Subject: 24.1.50; Segfault in with make-local-variable and indirect buffers User-Agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/24.1.50.1 (i486-pc-linux-gnu) Date: Wed, 11 Jul 2012 22:25:57 +0100 Message-ID: <87bojm7zx6.fsf@golux.woodcraft.me.uk> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 11 Jul 2012 17:46:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) I've been getting frequent crashes when using indirect buffers. I've narrowed them down to the following recipe, which consistently gets a segmentation fault for me with Emacs 24: cat > /tmp/crashme.el < /tmp/crashme.txt <where, buffer)) { /* Symbol is set up for this buffer's old local value: swap it out! */ swap_in_global_binding (XSYMBOL (sym)); } (see full backtrace below). I've also seen it crash in clone-indirect-buffer (though more usually it's only when you kill the buffer). In that case it seems to be this bit in buffer.c set_buffer_internal_1: if (sym->redirect == SYMBOL_LOCALIZED /* Just to be sure. */ && SYMBOL_BLV (sym)->fwd) /* Just reference the variable to cause it to become set for this buffer. */ Fsymbol_value (var); ----- In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of 2012-07-10 on golux, modified by Debian (emacs-snapshot package, version 2:20120705-1mjw1) Windowing system distributor `The X.Org Foundation', version 11.0.11201902 Configured using: `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_CTYPE: en_GB.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t ----- #0 0x08156a8c in swap_out_buffer_local_variables (b=b@entry=0x8b7db28) at buffer.c:2505 sym = 142721624 oalist = alist = 142203662 buffer = 146266925 #1 0x0815a379 in Fkill_buffer (buffer_or_name=138991257) at buffer.c:1656 buffer = 146266925 b = 0x8b7db28 tem = 138831130 m = #2 0x081ac0f3 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xffffcdf0) at eval.c:2819 fun = 136786053 original_fun = funcar = numargs = 1 lisp_numargs = val = backtrace = { next = 0xffffcedc, function = 0xffffcdf0, args = 0xffffcdf4, nargs = 1, debug_on_exit = 0 } internal_args = 0xffffcdf4 i = #3 0x081a89ed in Fcall_interactively (function=138908474, record_flag=138831130, keys=138840221) at callint.c:853 val = args = 0xffffcdf0 visargs = 0xffffcdd0 specs = filter_specs = teml = up_event = 138831130 enable = 1 speccount = 3 next_event = 2 prefix_arg = 138831130 string = 0xffffce10 "bKill buffer: " tem = varies = 0xffffcdb0 "" i = nargs = foo = arg_from_tty = key_count = 2 record_then_fail = 0 save_this_command = 138908474 save_last_command = 141330122 save_this_original_command = 138908474 save_real_this_command = 138908474 #4 0x081ac0d2 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0xffffcf20) at eval.c:2826 fun = 138425997 original_fun = funcar = numargs = 3 lisp_numargs = val = backtrace = { next = 0x0, function = 0xffffcf20, args = 0xffffcf24, nargs = 3, debug_on_exit = 0 } internal_args = 0xffffcf24 i = #5 0x081ac3a7 in call3 (fn=138909330, arg1=138908474, arg2=138831130, arg3=138831130) at eval.c:2619 ret_ungc_val = 142721622 args = {138909330, 138908474, 138831130, 138831130} #6 0x0813c365 in Fcommand_execute (cmd=138909330, record_flag=138908474, keys=138831130, special=138831130) at keyboard.c:10338 final = tem = prefixarg = #7 0x081486c1 in command_loop_1 () at keyboard.c:1569 scount = 2 cmd = keybuf = {96, 428, 142397630, 138831130, -10888, 135521619, 142397630, 138831154, -12297, 138831130, -12297, 138831130, 138831130, 135521917, 142397630, -12297, -157819388, 2, 140496742, 138831130, -10888, 138831130, 140496742, 4613402, 400, 1, 0, 138831130, -10888, 135514425} i = prev_modiff = 2 prev_buffer = 0x8b7db28 #8 0x081aa6e0 in internal_condition_case ( bfun=bfun@entry=0x81483a0 , handlers=138864682, hfun=hfun@entry=0x813e5a0 ) at eval.c:1332 val = c = { tag = 138831130, val = 138831130, next = 0xffffd168, gcpro = 0x0, jmp = {{ __jmpbuf = {1, 0, 138831130, -10888, -602430504, 385542199}, __mask_was_saved = 0, __saved_mask = { __val = {4294955296, 4294955224, 4294955236, 4294955216, 4160739592, 0, 136456303, 2, 134555894, 4294955216, 0, 0, 0, 0, 135610259, 2, 4294955364, 4294955216, 0, 0, 0, 4137164516, 4139719464, 134555158, 4294967295, 4160737268, 134555894, 1, 4294955312, 4160674838, 4160740032, 4132181552} } }}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0 } h = { handler = 138864682, var = 138831130, chosen_clause = 138831154, tag = 0xffffd058, next = 0x0 } #9 0x0813ceb5 in command_loop_2 (ignore=ignore@entry=138831130) at keyboard.c:1152 val = 142721622 #10 0x081aa60b in internal_catch (tag=138862658, func=func@entry=0x813ce90 , arg=138831130) at eval.c:1089 c = { tag = 138862658, val = 138831130, next = 0x0, gcpro = 0x0, jmp = {{ __jmpbuf = {1, 0, 138831130, -10888, -602577960, 385646135}, __mask_was_saved = 0, __saved_mask = { __val = {0, 0, 0, 0, 4138247633, 140593801, 136244952, 142614060, 136549538, 14, 0, 142614060, 14, 136549538, 4294955592, 22, 0, 22, 4294955592, 400, 4294957049, 136549538, 138953370, 138831130, 138953368, 4294956408, 135976291, 138953370, 138831130, 138831130, 1, 4138550208} } }}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0 } #11 0x0813e0da in command_loop () at keyboard.c:1131 No locals. #12 recursive_edit_1 () at keyboard.c:752 count = val = 0 #13 0x0813e3ca in Frecursive_edit () at keyboard.c:816 count = 0 buffer = 138831130 #14 0x0805aa90 in main (argc=, argv=0xffffd634) at emacs.c:1693 dummy = 0 stack_bottom_variable = 0 '\000' do_initial_setlocale = skip_args = 0 rlim = { rlim_cur = 8388608, rlim_max = 18446744073709551615 } no_loadup = 0 junk = 0x0 dname_arg = 0x0 ch_to_dir = 0xf6bf1b28 "" Lisp Backtrace: "kill-buffer" (0xffffcdf4) "call-interactively" (0xffffcf24) From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 12 03:20:57 2012 Received: (at 11917-done) by debbugs.gnu.org; 12 Jul 2012 07:20:57 +0000 Received: from localhost ([127.0.0.1]:34680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpDho-000897-BY for submit@debbugs.gnu.org; Thu, 12 Jul 2012 03:20:57 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:54634) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpDhl-00088y-O5 for 11917-done@debbugs.gnu.org; Thu, 12 Jul 2012 03:20:54 -0400 Received: from frontend4.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3WXpNZ73rgz3hhZh; Thu, 12 Jul 2012 09:16:29 +0200 (CEST) Received: from igel.home (ppp-88-217-107-49.dynamic.mnet-online.de [88.217.107.49]) by mail.mnet-online.de (Postfix) with ESMTPA id 3WXpMD4Zcqzbbjd; Thu, 12 Jul 2012 09:15:20 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 189CBCA2A3; Thu, 12 Jul 2012 09:15:19 +0200 (CEST) From: Andreas Schwab To: Matthew Woodcraft Subject: Re: bug#11917: 24.1.50; Segfault in with make-local-variable and indirect buffers References: <87bojm7zx6.fsf@golux.woodcraft.me.uk> X-Yow: Not enough people play SKEE-BALL.. They're always thinking about COCAINE or and ALIEN BEINGS!! Date: Thu, 12 Jul 2012 09:15:19 +0200 In-Reply-To: <87bojm7zx6.fsf@golux.woodcraft.me.uk> (Matthew Woodcraft's message of "Wed, 11 Jul 2012 22:25:57 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11917-done Cc: 11917-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Reduced test case: emacs --batch --eval "(with-current-buffer (get-buffer-create \"foo\") (make-local-variable 'foo) (make-indirect-buffer (current-buffer) \"bar\" t))" Fixed on emacs-24. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Tue Jun 17 20:17:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 09 Aug 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator