Ludovic Courtès schreef op ma 04-07-2022 om 12:09 [+0200]: > > Also, what if you mmap a region, use bytevector->pointer and pass > > it to > > some C thing, which saves the pointer somewhere where boehm-gc can > > find > > it and boehm-gc considers it to be live, is there something that > > prevents boehm-gc from improperly calling the finalizer & unmapping > > the > > region, causing a dangling pointer? > > There’s a risk, but I don’t think it’s specific to mmap.
AFAIK, make-bytevector doesn't have an issue here, so by default I would assume mmap to not have it either, unless documented otherwise. However, I am not seeing tests or analysis that verify there's no issue here even though plausibly there might be an issue and neither am I seeing documentation that this doesn't work (for mmap in specific, or more generally). Greetings, Maxime.