From 6fea08dbd230baf414dbd96bf96c8e9f2bbe62c0 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Fri, 18 Jan 2008 15:52:44 +0000
Subject: [PATCH] code/bit-bash.lisp: o Change MAX-BITS to #xffffffff.  This
 fixes (works around) the issue   reported by Walter Pelissero, reported on
 cmucl-help, 2008-01-09.   We will still have problems for sufficiently long
 strings.

boot-2007-12-1.lisp:
o Boot file to use for the above change.
---
 bootfiles/19d/boot-2007-12-1.lisp | 7 +++++++
 code/bit-bash.lisp                | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 bootfiles/19d/boot-2007-12-1.lisp

diff --git a/bootfiles/19d/boot-2007-12-1.lisp b/bootfiles/19d/boot-2007-12-1.lisp
new file mode 100644
index 000000000..bb04d2bda
--- /dev/null
+++ b/bootfiles/19d/boot-2007-12-1.lisp
@@ -0,0 +1,7 @@
+(in-package "VM")
+(handler-bind ((error (lambda (c)
+                        (declare (ignore c))
+                        (invoke-restart 'continue))))
+  (defconstant max-bits (1- (ash 1 vm:word-bits))
+    "The maximum number of bits that can be delt with during a single call."))
+
diff --git a/code/bit-bash.lisp b/code/bit-bash.lisp
index dcbccf7bc..173b2bb68 100644
--- a/code/bit-bash.lisp
+++ b/code/bit-bash.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bit-bash.lisp,v 1.23 2004/07/14 20:52:38 cwang Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bit-bash.lisp,v 1.24 2008/01/18 15:52:44 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -26,8 +26,8 @@
 (defconstant unit-bits vm:word-bits
   "The number of bits to process at a time.")
 
-(defconstant max-bits (ash most-positive-fixnum -2)
-  "The maximum number of bits that can be delt with during a single call.")
+(defconstant max-bits (1- (ash 1 vm:word-bits))
+  "The maximum number of bits that can be dealt with during a single call.")
 
 
 (deftype unit ()
-- 
GitLab