Summary
evicting srfi-4 vectors breaks ffi compatibility
Metadata
- Id: 49594359bf2caa68607647530d45a43edf782389
- Trac id: 540
- Type: defect
- Reporter: syn
- Owner:
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: wontfix
- Priority: major
- Milestone:
- Version: 4.6.x
- Changetime: 2011-03-28 10:10:13 UTC
- Created: 2011-03-17 17:44:15 UTC
- Keywords:
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.
Changes and comments
[2011-03-20 13:53:12 UTC] felix removed milestone 4.7.0
[2011-03-20 13:53:12 UTC] felix wrote:
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.