changeset 104609:850f9373a88a

(byte-compile-lapcode): Signal overflow.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 26 Aug 2009 02:56:05 +0000
parents 9eb9d3014be0
children e66828f2d289
files lisp/ChangeLog lisp/emacs-lisp/bytecomp.el
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Aug 25 19:26:37 2009 +0000
+++ b/lisp/ChangeLog	Wed Aug 26 02:56:05 2009 +0000
@@ -1,3 +1,7 @@
+2009-08-26  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* emacs-lisp/bytecomp.el (byte-compile-lapcode): Signal overflow.
+
 2009-08-25  Michael Albinus  <michael.albinus@gmx.de>
 
 	* simple.el (process-file-side-effects): New defvar.
--- a/lisp/emacs-lisp/bytecomp.el	Tue Aug 25 19:26:37 2009 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Wed Aug 26 02:56:05 2009 +0000
@@ -854,7 +854,9 @@
 	      (t			; Absolute jump
 	       (setq pc (car (cdr (car bytes))))	; Pick PC from tag
 	       (setcar (cdr bytes) (logand pc 255))
-	       (setcar bytes (lsh pc -8))))
+	       (setcar bytes (lsh pc -8))
+               ;; FIXME: Replace this by some workaround.
+               (if (> (car bytes) 255) (error "Bytecode overflow"))))))
 	(setq patchlist (cdr patchlist))))
     (apply 'unibyte-string (nreverse bytes))))