Weak pointer to static array
Describe the bug
Weak pointer to a static vector is not "broken" when the vector is deallocated.
To Reproduce
(defparameter *ref*
(let ((vec (make-array 1000000 :element-type '(unsigned-byte 8)
:initial-element 1
:allocation :malloc)))
(extensions:make-weak-pointer vec)))
; => *ref*
(gc :full T)
; => NIL
(setf *print-length* 10)
; => 10
(format t "~a~%" (extensions:weak-pointer-value *ref*))
; => error is signalled:
;; Error in function UNIX::SIGSEGV-HANDLER:
;; Segmentation Violation at #x10204283.
;; [Condition of type SIMPLE-ERROR]
Expected behavior
Last form should output NIL.
Desktop (please complete the following information):
- OS: Linux
- CPU: x86
- Version: 21e