all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Subject: Avenue for a fix
Date: Wed, 21 Jan 2004 04:21:18 -0500	[thread overview]
Message-ID: <E1AjEY2-0001uk-Lk@fencepost.gnu.org> (raw)

This may be the right approach for a fix, but I don't think
it is safe to change current_buffer directly this way.
But now that the bug is probably identified, would someone
like to write a clean fix?


Date: Tue, 20 Jan 2004 17:33:34 +0300
From: Dmitry Antipov <dmitry.antipov@mail.ru>
X-Accept-Language: en-us, en
To: bug-gnu-emacs@gnu.org
Subject: Probably fixed [Re: Crash calling md5 for a list of buffers]
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org

Index: fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fns.c,v
retrieving revision 1.354
diff -u -r1.354 fns.c
--- fns.c       29 Dec 2003 13:51:54 -0000      1.354
+++ fns.c       20 Jan 2004 13:33:17 -0000
@@ -5386,7 +5386,7 @@
   int start_char = 0, end_char = 0;
   int start_byte = 0, end_byte = 0;
   register int b, e;
-  register struct buffer *bp;
+  register struct buffer *bp, *tem;
   int temp;
 
   if (STRINGP (object))
@@ -5542,8 +5542,10 @@
                  Fsignal (Qcoding_system_error, Fcons (coding_system, 
Qnil));
            }
        }
-
+      /* At this moment, current buffer may be not equal to bp.  */
+      tem = current_buffer, current_buffer = bp;
       object = make_buffer_string (b, e, 0);
+      current_buffer = tem;
 
       if (STRING_MULTIBYTE (object))
        object = code_convert_string1 (object, coding_system, Qnil, 1);



_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

                 reply	other threads:[~2004-01-21  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1AjEY2-0001uk-Lk@fencepost.gnu.org \
    --to=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.