unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Rich Felker <dalias@aerifal.cx>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: dired.c fails to gc protect lisp object (patch included)
Date: Mon, 12 Mar 2007 00:24:34 -0400	[thread overview]
Message-ID: <E1HQc5K-00027Z-AE@fencepost.gnu.org> (raw)
In-Reply-To: <20070311235337.GA9566@brightrain.aerifal.cx> (message from Rich Felker on Sun, 11 Mar 2007 19:53:37 -0400)

Thanks for finding this bug.  Does this patch fix it?
I like it better because it is more local.

Index: dired.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dired.c,v
retrieving revision 1.130
diff -c -c -r1.130 dired.c
*** dired.c	13 Jan 2007 21:45:34 -0000	1.130
--- dired.c	12 Mar 2007 03:24:31 -0000
***************
*** 670,677 ****
  	  if (!NILP (predicate))
  	    {
  	      Lisp_Object decoded;
  	      decoded = Fexpand_file_name (DECODE_FILE (name), dirname);
! 	      if (NILP (call1 (predicate, decoded)))
  		continue;
  	    }
  
--- 670,684 ----
  	  if (!NILP (predicate))
  	    {
  	      Lisp_Object decoded;
+ 	      Lisp_Object val;
+ 	      struct gcpro gcpro1;
+ 
+ 	      GCPRO1 (name);
  	      decoded = Fexpand_file_name (DECODE_FILE (name), dirname);
! 	      val = call1 (predicate, decoded);
! 	      UNGCPRO;
! 
! 	      if (NILP (val))
  		continue;
  	    }

      reply	other threads:[~2007-03-12  4:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 23:53 dired.c fails to gc protect lisp object (patch included) Rich Felker
2007-03-12  4:24 ` Richard Stallman [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=E1HQc5K-00027Z-AE@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=dalias@aerifal.cx \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).