1.0.38.6: Clear higher order bits for SSE operations that don't
[sbcl.git] / tests / packages.impure.lisp
index 5078b9e..b2421b2 100644 (file)
@@ -255,3 +255,28 @@ if a restart was invoked."
       (is restartedp)
       (is (eq (sym "FOO" "SYM")
               (sym "BAZ" "SYM"))))))
+
+;;; WITH-PACKAGE-ITERATOR error signalling had problems
+(with-test (:name with-package-itarator.error)
+  (assert (eq :good
+              (handler-case
+                  (progn
+                    (eval '(with-package-iterator (sym :cl-user :foo)
+                            (sym)))
+                    :bad)
+                ((and simple-condition program-error) (c)
+                  (assert (equal (list :foo) (simple-condition-format-arguments c)))
+                  :good)))))
+
+;;; MAKE-PACKAGE error in another thread blocking FIND-PACKAGE & FIND-SYMBOL
+#+sb-thread
+(with-test (:name :bug-511072)
+  (let* ((p (make-package :bug-511072))
+         (sem (sb-thread:make-semaphore))
+         (t2 (sb-thread:make-thread (lambda ()
+                                      (handler-bind ((error (lambda (c)
+                                                              (sb-thread:signal-semaphore sem)
+                                                              (signal c))))
+                                        (make-package :bug-511072))))))
+    (sb-thread:wait-on-semaphore sem)
+    (assert (eq 'cons (read-from-string "CL:CONS")))))