aggregates in structs returned by values are invalid pointers
Bug #1474776 reported by
3b
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CFFI |
New
|
Undecided
|
Unassigned |
Bug Description
(defcstruct cc
(a :char :count 4)
(b :char :count 4))
(defcfun "makepair" (:struct cc)) ;; from the fsbv tests, intended to return struct containing 2 ints
(makepair)
;; =>
(B #.(SB-SYS:INT-SAP #X09F8FFF4) A #.(SB-SYS:INT-SAP #X09F8FFF0))
As far as I can tell, those are pointers into a struct which was allocated by WITH-FOREIGN-OBJECT within the MAKEPAIR defcfun, so are no longer valid after it returns.
To post a comment you must log in.