Paste number 9575: AAARGH

Index of paste annotations: 1

Paste number 9575: AAARGH
Pasted by: nikodemus
When:9 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+7DZ
Channel:#lisp
Paste contents:
Raw Source | XML | Display As
debugger invoked on a SIMPLE-ERROR in thread 16610:
  #<SB!C:TN t1> is not valid as the first argument to VOP:
  SB!KERNEL:GET-LISP-OBJ-ADDRESS
Primitive type: SB!VM::POSITIVE-FIXNUM
SC restrictions:
  (SB!VM::DESCRIPTOR-REG)
The primitive type disallows these loadable SCs:
  (SB!VM::DESCRIPTOR-REG)

Annotations for this paste:

Annotation number 1: nikodemus, try this (untested, being built)
Pasted by: Xophe
When:9 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+7DZ/1
Paste contents:
Raw Source | Display As
Index: src/code/target-thread.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/target-thread.lisp,v
retrieving revision 1.33
diff -u -r1.33 target-thread.lisp
--- src/code/target-thread.lisp 1 Jul 2005 08:48:33 -0000       1.33
+++ src/code/target-thread.lisp 2 Jul 2005 11:48:39 -0000
@@ -28,28 +28,26 @@

 (defun thread-state (thread)
   (let ((state
-         (sb!kernel:make-lisp-obj
-          (sb!sys:sap-int
-           (sb!sys:sap-ref-sap (thread-%sap thread)
-                               (* sb!vm::thread-state-slot
-                                  sb!vm::n-word-bytes))))))
+        (sb!sys:sap-int
+         (sb!sys:sap-ref-sap (thread-%sap thread)
+                             (* sb!vm::thread-state-slot
+                                sb!vm::n-word-bytes)))))
     (ecase state
-      (0 :starting)
-      (1 :running)
-      (2 :suspended)
-      (3 :dead))))
+      (#.(sb!vm:fixnumize 0) :starting)
+      (#.(sb!vm:fixnumize 1) :running)
+      (#.(sb!vm:fixnumize 2) :suspended)
+      (#.(sb!vm:fixnumize 3) :dead))))

 (defun %set-thread-state (thread state)
   (setf (sb!sys:sap-ref-sap (thread-%sap thread)
                             (* sb!vm::thread-state-slot
                                sb!vm::n-word-bytes))
         (sb!sys:int-sap
-         (sb!kernel:get-lisp-obj-address
-          (ecase state
-            (:starting 0)
-            (:running 1)
-            (:suspended 2)
-            (:dead 3))))))
+         (ecase state
+           (:starting #.(sb!vm:fixnumize 0))
+           (:running #.(sb!vm:fixnumize 1))
+           (:suspended #.(sb!vm:fixnumize 2))
+           (:dead #.(sb!vm:fixnumize 3))))))

 (defun thread-alive-p (thread)
   (not (eq :dead (thread-state thread))))

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.