From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: Re: dired.c fails to gc protect lisp object (patch included) Date: Mon, 12 Mar 2007 00:24:34 -0400 Message-ID: References: <20070311235337.GA9566@brightrain.aerifal.cx> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1173673647 30057 80.91.229.12 (12 Mar 2007 04:27:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2007 04:27:27 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Rich Felker Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 12 05:27:20 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HQc80-0003AI-7F for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2007 05:27:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQc8c-0005Ju-8m for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Mar 2007 23:27:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQc7j-0004qE-NE for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2007 00:27:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQc7j-0004pr-4m for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2007 00:27:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQc7i-0004pl-Ua for bug-gnu-emacs@gnu.org; Sun, 11 Mar 2007 23:27:02 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HQc76-0003mc-5u for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2007 00:26:24 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HQc5K-00027Z-AE; Mon, 12 Mar 2007 00:24:34 -0400 In-reply-to: <20070311235337.GA9566@brightrain.aerifal.cx> (message from Rich Felker on Sun, 11 Mar 2007 19:53:37 -0400) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15624 Archived-At: 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; }