From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: PATCH: fix for memory corruption and eventual crash in print.c Date: Mon, 21 Jul 2008 01:06:45 -0400 Message-ID: <87y73vu8pm.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216616823 14667 80.91.229.12 (21 Jul 2008 05:07:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jul 2008 05:07:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Ami Fischman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 21 07:07:51 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KKnck-0006xy-3y for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 07:07:50 +0200 Original-Received: from localhost ([127.0.0.1]:50900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKnbr-0004FW-5B for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 01:06:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKnbk-0004EE-1z for emacs-devel@gnu.org; Mon, 21 Jul 2008 01:06:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKnbi-0004Ct-Aq for emacs-devel@gnu.org; Mon, 21 Jul 2008 01:06:46 -0400 Original-Received: from [199.232.76.173] (port=33765 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKnbi-0004Cl-5q for emacs-devel@gnu.org; Mon, 21 Jul 2008 01:06:46 -0400 Original-Received: from c-24-63-201-57.hsd1.ma.comcast.net ([24.63.201.57]:16238 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKnbh-0006YM-O1 for emacs-devel@gnu.org; Mon, 21 Jul 2008 01:06:45 -0400 Original-Received: by furry (Postfix, from userid 1000) id 50228C054; Mon, 21 Jul 2008 01:06:45 -0400 (EDT) In-Reply-To: (Ami Fischman's message of "Sat, 5 Jul 2008 21:11:14 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101049 Archived-At: "Ami Fischman" writes: > src/print.c:print_object() has this code: > > 1570 if (NILP (Vprint_circle) && NILP (Vprint_gensym)) > [...] > 1581 being_printed[print_depth] = obj; > [...] > 1611 print_depth++; > 1612 > 1613 /* See similar code in print_preprocess. */ > 1614 if (print_depth > PRINT_CIRCLE) > 1615 error ("Apparently circular structure being printed"); > > Note that being_printed[print_depth] is assigned to /before/ print_depth is > checked for exceeding PRINT_CIRCLE (the declared size of being_printed). > > Patch attached. Thanks, I've checked in the fix (to both the trunk and the branch).