Closed bohonghuang closed 1 year ago
The (setf (mem-ref ...) ...) here is unnecessary and writing data to a memory that has already been released will cause a segmentation fault, leading to a crash of the Lisp session:
(setf (mem-ref ...) ...)
https://github.com/digikar99/unboxables/blob/7f877eb39caa6d018e86a2c62d1afd68d2a215c7/unboxables.lisp#L50-L53
Right, in C, we might set the pointer to NULL, not the data at the pointer! Thanks for the fix!
The
(setf (mem-ref ...) ...)
here is unnecessary and writing data to a memory that has already been released will cause a segmentation fault, leading to a crash of the Lisp session:https://github.com/digikar99/unboxables/blob/7f877eb39caa6d018e86a2c62d1afd68d2a215c7/unboxables.lisp#L50-L53