Opened 14 years ago

Closed 14 years ago

#540 closed defect (wontfix)

evicting srfi-4 vectors breaks ffi compatibility

Reported by: Moritz Heidkamp Owned by:
Priority: major Milestone:
Component: core libraries Version: 4.6.x
Keywords: Cc:
Estimated difficulty:

Description

The program

((foreign-lambda foo f32vector) (object-evict (f32vector 1 2 3)))

fails with the error

Error: bad argument type - not a structure of the required type
f32vector
#<f32vector>


It seems like evicting srfi-4 vectors makes them incompatible with the FFI.

Change History (2)

comment:1 Changed 14 years ago by felix winkelmann

Milestone: 4.7.0

The problem is that the serialization also copies the tag of the structure that holds the vector (a srfi-4 vector is a struct with a symbol tag and a blob). The type-check compares the structure tag using the equivalent of eq? which fails, since the evicted symbol tag is not identical to the symbol that's used for comparison.

I can't think of a suitable solution to this right now.

comment:2 Changed 14 years ago by felix winkelmann

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.