[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: subtle byte-compiler bug
From: |
Andreas Schwab |
Subject: |
Re: subtle byte-compiler bug |
Date: |
Thu, 08 Jan 2004 01:19:41 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) |
David PONCE <address@hidden> 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, address@hidden
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."