Re: [Sbcl-devel] GC write-protected mappings vs. the OS kernel
Samium Gromoff <_deepfire <at> feelingofgreen.ru>
2009-11-10 16:11:07 GMT
From: Samium Gromoff <_deepfire <at> feelingofgreen.ru>
> From: Juho Snellman <jsnell <at> iki.fi>
>> Samium Gromoff <_deepfire <at> feelingofgreen.ru> writes:
>>> Good day,
>>> While debugging mysterious ioctl() failures in lh-usb on SBCL,
>>> I have discovered that using CFFI:WITH-POINTER-TO-VECTOR-DATA
>>> doesn't guarantee that the vector is in a writable region.
>> I thought we'd never write protect specialized raw arrays (either they
>> are in the nursery, or they're tenured into an unboxed region which
>> never get wpd). And passing generic arrays to ffi doesn't feel right.
>> What's the use case?
> Array element type is (unsigned-byte 8), use case is shovelling
> data in/out a USB device using bulk transfers via ioctl().
A missing detail: while the vector is created in a live core all /seems/
to be well. But when it comes from a dumped core, it gets a chance
(there doesn't appears to be a determinism there) of being in a
1. It might be just that I didn't have enough statistics, as I'm working
mainly with cores of my own dumping. Eh, hehe.