[cffi-devel] CFFI from git bug with :int64 struct fields?
When using latest CFFI via clbuild2 (git:// common-lisp.net/projects/cffi/cffi.git), I encountered a problem with :int64 fields. CFFI seems to treat this field as (signed-byte 32). This is with SBCL x86-64 on Ubuntu 10.10: This is SBCL 1.0.55.1-6548750, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. * (require :cffi) NIL * (cffi:defcstruct foo (a :int64)) FOO * (cffi:with-foreign-object (foo 'foo) (setf (cffi:foreign-slot-value foo 'foo 'a) 123456789012345)) ; in: CFFI:WITH-FOREIGN-OBJECT (FOO 'FOO) ; (SETF (CFFI:FOREIGN-SLOT-VALUE FOO 'FOO 'A) 123456789012345) ; --> LET* MULTIPLE-VALUE-BIND LET PROGN CFFI::FOREIGN-SLOT-SET SETF LET* ; --> MULTIPLE-VALUE-BIND LET PROGN CFFI::MEM-SET CFFI-SYS:%MEM-SET LET SETF ; ==> ; (SB-KERNEL:%SET-SIGNED-SAP-REF-32 FOO 0 #:VALUE14) ; ; caught WARNING: ; Derived type of #:VALUE14 is ; (VALUES (INTEGER 123456789012345 123456789012345) &OPTIONAL), ; conflicting with its asserted type ; (SIGNED-BYTE 32). ; See also: ; The SBCL Manual, Node "Handling of Types" ; ; compilation unit finished ; caught 1 WARNING condition debugger invoked on a SIMPLE-TYPE-ERROR in thread #<THREAD "initial thread" RUNNING {10029B97C3}>: Value of #:VALUE14 in (SB-KERNEL:%SET-SIGNED-SAP-REF-32 FOO 0 #:VALUE14) is 123456789012345, not a (SIGNED-BYTE 32). Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level. (SB-C::%COMPILE-TIME-TYPE-ERROR (123456789012345) (SIGNED-BYTE 32) #<unavailable argument> ((SB-KERNEL:%SET-SIGNED-SAP-REF-32 FOO 0 #:VALUE14) . #:VALUE14)) 0] 0
Hello Alistair, On Fri, Mar 2, 2012 at 9:28 PM, Alistair Gee <alistair.gee@gmail.com> wrote:
When using latest CFFI via clbuild2 (git://common-lisp.net/projects/cffi/cffi.git), I encountered a problem with :int64 fields. CFFI seems to treat this field as (signed-byte 32).
Your email seems to have fallen through the cracks; sorry about that. Are you still experiencing this issue? Cheers, -- Luís Oliveira http://r42.eu/~luis/
On Wed, Nov 7, 2012 at 1:59 AM, Luís Oliveira <luismbo@gmail.com> wrote:
Hello Alistair,
On Fri, Mar 2, 2012 at 9:28 PM, Alistair Gee <alistair.gee@gmail.com> wrote:
When using latest CFFI via clbuild2 (git://common-lisp.net/projects/cffi/cffi.git), I encountered a problem with :int64 fields. CFFI seems to treat this field as (signed-byte 32).
Your email seems to have fallen through the cracks; sorry about that. Are you still experiencing this issue?
Cheers,
-- Luís Oliveira http://r42.eu/~luis/
Hi Luis, I switched to CFFI on quicklisp, and that version does not have this problem. So the original problem is not affecting me. Thanks. Alistair
On Wed, Nov 7, 2012 at 5:14 PM, Alistair Gee <alistair.gee@gmail.com> wrote:
I switched to CFFI on quicklisp, and that version does not have this problem. So the original problem is not affecting me.
OK. I couldn't reproduce the bug with current CFFI + SBCL 1.1.1.8 + Ubuntu 12.04 on x86-64 either. Cheers, -- Luís Oliveira http://r42.eu/~luis/
On Wed, 2012-11-07 at 09:14 -0800, Alistair Gee wrote:
On Wed, Nov 7, 2012 at 1:59 AM, Luís Oliveira <luismbo@gmail.com> wrote: Hello Alistair,
On Fri, Mar 2, 2012 at 9:28 PM, Alistair Gee <alistair.gee@gmail.com> wrote: > When using latest CFFI via clbuild2 > (git://common-lisp.net/projects/cffi/cffi.git), I encountered a problem with > :int64 fields. CFFI seems to treat this field as (signed-byte 32).
Your email seems to have fallen through the cracks; sorry about that. Are you still experiencing this issue?
I switched to CFFI on quicklisp, and that version does not have this problem. So the original problem is not affecting me. Thanks.
I think this was the bug I fixed in commit 0e65e0790c38ce4c15dab3539bc7e76bd151d82e -- Stelian Ionescu a.k.a. fe[nl]ix Quidquid latine dictum sit, altum videtur. http://common-lisp.net/project/iolib
participants (3)
-
Alistair Gee
-
Luís Oliveira
-
Stelian Ionescu