Fix copy-structure. When copying from stack to heap, garbage could
end up in the heap making GC unhappy. Thanks to James Knight.
;;;; -*- coding: utf-8; fill-column: 78 -*-
changes relative to sbcl-1.0.55:
+ * bug fix: fix copy-structure. When copying from stack to heap, garbage
+ could end up in the heap making GC unhappy.
+ (Thanks to James Knight, lp#911027)
* enhancements
** SBCL can now be built using Clang.
* bug fix: compiler errors when weakening hairy integer types. (lp#913232)
#!+sb-doc
"Return a copy of STRUCTURE with the same (EQL) slot values."
(declare (type structure-object structure))
- (let* ((len (%instance-length structure))
- (res (%make-instance len))
- (layout (%instance-layout structure))
+ (let* ((layout (%instance-layout structure))
+ (res (%make-instance (%instance-length structure)))
+ (len (layout-length layout))
(nuntagged (layout-n-untagged-slots layout)))
(declare (type index len))