From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: editfns.c (Fformat): fix for segfault Date: Sun, 04 May 2003 09:04:27 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <851xzo9f2l.fsf@pi.meyering.net> <85n0i4yvbs.fsf@pi.meyering.net> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1052053869 1946 80.91.224.249 (4 May 2003 13:11:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 4 May 2003 13:11:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 04 15:11:07 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19CJGl-0000V9-00 for ; Sun, 04 May 2003 15:11:07 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19CJJI-0003oH-00 for ; Sun, 04 May 2003 15:13:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19CJFS-0001WT-02 for emacs-devel@quimby.gnus.org; Sun, 04 May 2003 09:09:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19CJEU-0000pL-00 for emacs-devel@gnu.org; Sun, 04 May 2003 09:08:46 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19CJEN-0000et-00 for emacs-devel@gnu.org; Sun, 04 May 2003 09:08:41 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19CJAJ-00078L-00 for emacs-devel@gnu.org; Sun, 04 May 2003 09:04:27 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 19CJAJ-00014h-00; Sun, 04 May 2003 09:04:27 -0400 Original-To: Jim Meyering In-reply-to: <85n0i4yvbs.fsf@pi.meyering.net> (message from Jim Meyering on Sat, 03 May 2003 16:10:47 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13677 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13677 Does this solve the problem? *** print.c.~1.185.~ Fri Mar 14 16:00:39 2003 --- print.c Sat May 3 18:09:00 2003 *************** *** 759,772 **** { PRINTDECLARE; Lisp_Object printcharfun; ! struct gcpro gcpro1, gcpro2; ! Lisp_Object tem; /* Save and restore this--we are altering a buffer but we don't want to deactivate the mark just for that. No need for specbind, since errors deactivate the mark. */ ! tem = Vdeactivate_mark; ! GCPRO2 (object, tem); printcharfun = Vprin1_to_string_buffer; PRINTPREPARE; --- 759,776 ---- { PRINTDECLARE; Lisp_Object printcharfun; ! /* struct gcpro gcpro1, gcpro2; */ ! Lisp_Object save_deactivate_mark; ! int count = specpdl_ptr - specpdl; ! ! specbind (Qinhibit_modification_hooks, Qt); /* Save and restore this--we are altering a buffer but we don't want to deactivate the mark just for that. No need for specbind, since errors deactivate the mark. */ ! save_deactivate_mark = Vdeactivate_mark; ! /* GCPRO2 (object, save_deactivate_mark); */ ! abort_on_gc++; printcharfun = Vprin1_to_string_buffer; PRINTPREPARE; *************** *** 781,790 **** Ferase_buffer (); set_buffer_internal (old); ! Vdeactivate_mark = tem; ! UNGCPRO; ! return object; } DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0, --- 785,795 ---- Ferase_buffer (); set_buffer_internal (old); ! Vdeactivate_mark = save_deactivate_mark; ! /* UNGCPRO; */ ! abort_on_gc--; ! return unbind_to (count, object); } DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0,