sbcl.sbcl/tests/arena-clos.impure.lisp
Stas Boukarev 057cc5e5c9
Some checks are pending
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / self (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Don't run arena.impure with gc-stress.
c-find-heap->arena doesn't use gc_stop_the_world in a safe way.
2024-08-02 01:57:20 +03:00

37 lines
1.2 KiB
Common Lisp

#+(or gc-stress ;; c-find-heap->arena is not gc-safe
(not system-tlabs) interpreter) (invoke-restart 'run-tests::skip-file)
(defmethod translate ((x (eql :a)) val) (* 1 val))
(defmethod translate ((x (eql :b)) val) (* 2 val))
(defmethod translate ((x (eql :c)) val) (* 3 val))
(defmethod translate ((x (eql :d)) val) (* 4 val))
(defmethod translate ((x (eql :e)) val) (* 5 val))
(defmethod translate ((x (eql :f)) val) (* 6 val))
(defmethod translate ((x (eql :g)) val) (* 7 val))
(defmethod translate ((x (eql :h)) val) (* 8 val))
(defmethod translate ((x (eql :i)) val) (* 9 val))
(defmethod translate ((x (eql :j)) val) (* 10 val))
(defmethod translate ((x (eql :k)) val) (* 11 val))
(defvar *a* (sb-vm:new-arena 1048576))
(defun f (arg) (sb-vm:with-arena (*a*) (translate arg 3)))
(f :c)
(assert (not (sb-vm:c-find-heap->arena)))
(defmethod zook ((x list))
(format t "is-list~%"))
(defmethod zook ((x null))
(format t "is-null~%")
(call-next-method))
(defmethod zook ((x (eql nil)))
(format t "is-eql-nil~%")
(call-next-method))
(defvar *a* (sb-vm:new-arena 1048576))
(defun g ()
(sb-vm:with-arena (*a*)
(zook nil)))
(g)
(assert (not (sb-vm:c-find-heap->arena)))