libcffi pointers become stale in image save/restore cycle

Bug #1949885 reported by Jason Ruchti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CFFI
New
Undecided
Unassigned

Bug Description

CFFI version: >v0.16.1
Lisp version: SBCL 2.1.5, CCL 1.12
Operating System version: Ubuntu 20.04

This issue is also documented in the code at https://github.com/cffi/cffi/blob/master/libffi/funcall.lisp#L92.

If a cffi function is called prior to image save, the cffi-cache will be populated with pointers to foreign memory. These pointers are serialized to disk as part of the image save process and are stale upon restart of the image, leading to hard errors if the same functions are called in the program.

Would it be possible to store these foreign pointers in a global variable such that it could be cleared in an image dump hook? Thanks.

Related to 366c7369962bddab7c7960489cfd24eeae707817

summary: - libcffi may become stale in image save/restore cycle
+ libcffi pointers may become stale in image save/restore cycle
summary: - libcffi pointers may become stale in image save/restore cycle
+ libcffi pointers become stale in image save/restore cycle
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.