From: Andreas Schwab <schwab@suse.de>
Cc: emacs-pretest-bug <emacs-pretest-bug@gnu.org>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: subtle byte-compiler bug
Date: Thu, 08 Jan 2004 01:19:41 +0100 [thread overview]
Message-ID: <m3vfnncmw2.fsf@whitebox.m5r.de> (raw)
In-Reply-To: <16953250.1073488076347.JavaMail.www@wwinf0103> (David PONCE's message of "Wed, 7 Jan 2004 16:07:56 +0100 (CET)")
David PONCE <david.ponce@wanadoo.fr> 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) <case Lisp_Vectorlike>: Only mask
size if PSEUDOVECTOR_FLAG is set.
Index: print.c
===================================================================
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;
case Lisp_Vectorlike:
- size = XVECTOR (obj)->size & PSEUDOVECTOR_SIZE_MASK;
+ size = XVECTOR (obj)->size;
+ if (size & PSEUDOVECTOR_FLAG)
+ size &= PSEUDOVECTOR_SIZE_MASK;
for (i = 0; i < size; i++)
print_preprocess (XVECTOR (obj)->contents[i]);
break;
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2004-01-08 0:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 15:07 subtle byte-compiler bug David PONCE
2004-01-08 0:19 ` Andreas Schwab [this message]
2004-01-08 13:38 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2004-01-08 8:12 David PONCE
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=m3vfnncmw2.fsf@whitebox.m5r.de \
--to=schwab@suse.de \
--cc=emacs-devel@gnu.org \
--cc=emacs-pretest-bug@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 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).