Not enough type checking on API boundaries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CFFI |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
James Anderson pointed to some examples of how the CFFI API doesn't perform adequate type checking resulting in cryptic errors coming from CFFI internals: <http://
E.g., (foreign-slot-value s 'something-
; caught WARNING:
; Error during compiler-
; (CFFI::
; intercept.
;
; There is no applicable method for the generic function
; #<STANDARD-
; when called with arguments
; (#<CFFI:
We have all the information to properly point out that a struct type was expected but we got something else. We can do it at compile time even.
given that the reported type of the variable was in all cases a pointer, one would expect all references to succeed.