From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: subtle byte-compiler bug Date: Thu, 08 Jan 2004 01:19:41 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <16953250.1073488076347.JavaMail.www@wwinf0103> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1073523168 29557 80.91.224.253 (8 Jan 2004 00:52:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 00:52:48 +0000 (UTC) Cc: emacs-pretest-bug , emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jan 08 01:52:45 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeOPl-0003DT-00 for ; Thu, 08 Jan 2004 01:52:45 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeOPl-0008Eo-00 for ; Thu, 08 Jan 2004 01:52:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AePCY-00074Q-4D for emacs-devel@quimby.gnus.org; Wed, 07 Jan 2004 20:43:10 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AeP4W-0003tI-Q9 for emacs-devel@gnu.org; Wed, 07 Jan 2004 20:34:52 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AeP2r-0003Fh-U2 for emacs-devel@gnu.org; Wed, 07 Jan 2004 20:33:41 -0500 Original-Received: from [134.76.166.209] (helo=lisa.goe.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AeOrN-00084l-2m; Wed, 07 Jan 2004 20:21:17 -0500 Original-Received: from mutter.goe.net (mutter-lisa0.a11.local [192.168.31.26]) by lisa.goe.net (8.12.10/8.12.10) with ESMTP id i080Jhur010449; Thu, 8 Jan 2004 01:19:43 +0100 Original-Received: from whitebox.a11.local ([192.168.31.90] helo=whitebox.as.local) by mutter.goe.net with esmtp (Exim 4.22) id 1AeNtn-0003F0-C3; Thu, 08 Jan 2004 01:19:43 +0100 Original-Received: by whitebox.as.local (Postfix, from userid 500) id A2C7A8096C; Thu, 8 Jan 2004 01:19:42 +0100 (CET) Original-To: david.ponce@wanadoo.fr X-Yow: Why are these athletic shoe salesmen following me?? In-Reply-To: <16953250.1073488076347.JavaMail.www@wwinf0103> (David PONCE's message of "Wed, 7 Jan 2004 16:07:56 +0100 (CET)") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19085 gmane.emacs.pretest.bugs:1765 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19085 David PONCE writes: > I finally got a little time to investigate on that problem and > discovered that the bug is not in the byte-compiler but in the > `prin1' primitive. > > Sometimes `prin1' print incorrect uninterned symbol references, > that can result in writing invalid byte-compiled code. Thanks for the testcase. I have installed this change to fix the bug: * print.c (print_preprocess) : Only mask size if PSEUDOVECTOR_FLAG is set. Index: print.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/emacs/emacs/src/print.c,v retrieving revision 1.196 retrieving revision 1.197 diff -u -a -p -a -u -p -r1.196 -r1.197 --- print.c 31 Dec 2003 00:24:28 -0000 1.196 +++ print.c 8 Jan 2004 00:15:52 -0000 1.197 @@ -1342,7 +1342,9 @@ print_preprocess (obj) goto loop; =20 case Lisp_Vectorlike: - size =3D XVECTOR (obj)->size & PSEUDOVECTOR_SIZE_MASK; + size =3D XVECTOR (obj)->size; + if (size & PSEUDOVECTOR_FLAG) + size &=3D PSEUDOVECTOR_SIZE_MASK; for (i =3D 0; i < size; i++) print_preprocess (XVECTOR (obj)->contents[i]); break; Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstra=C3=9Fe 5, 90409 N=C3=BCrnberg, Germany Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."