[cffi-devel] Lispworks dies (kinda) too

Kenny Tilton ktilton at nyc.rr.com
Thu Sep 15 15:40:33 UTC 2005


Very interesting. Lispworks also dies at the same place, in dbgheap.c. 
And I am not sure "dies" is the right word. Not sure how it survived, 
but it ran to completion (the "hi mom" thing got in when I was just 
trying to figure out where the code was going, and I just haven't gotten 
round to taking it out):

> CL-USER 1 > (cffi-tests::do-tests)
> Doing 71 pending tests of 71 tests total.
>
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.CHAR
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.INT
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.LONG
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.FLOAT
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.DOUBLE
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.STRING.1
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.STRING.2
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.STRING.3
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.NOARGS
> (:HI-MOM T)  CFFI-TESTS::DEFCFUN.NOOP
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.CHAR
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.UNSIGNED-CHAR
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.SHORT
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.UNSIGNED-SHORT
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.INT
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.UNSIGNED-INT
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.LONG
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.UNSIGNED-LONG
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.FLOAT
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.DOUBLE
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.POINTER
> (:HI-MOM T) 

Here is where ACL and Lispworks (the Lisp images) land in the VC++ 
debugger on an assertion in dbgheap.c.

>
> Test CFFI-TESTS::CALLBACKS.STRING failed
> Form: (CFFI-TESTS::EXPECT-STRCAT (CFFI:CALLBACK CFFI-TESTS::LISP-STRCAT))
> Expected value: 1
> Actual value: #<SIMPLE-ERROR 21BD3DD4>.
>
> (:HI-MOM T)  CFFI-TESTS::CALLBACKS.QSORT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.CHAR
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.UNSIGNED-CHAR
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.SHORT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.UNSIGNED-SHORT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.INT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.UNSIGNED-INT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.LONG
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.UNSIGNED-LONG
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.FLOAT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.DOUBLE
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.POINTER
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.REF.STRING
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.SET.INT
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.SET.STRING
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.GET-VAR-PTR.1
> (:HI-MOM T)  CFFI-TESTS::FOREIGN-GLOBALS.GET-VAR-PTR.2
> (:HI-MOM T)  CFFI-TESTS::DEREF.CHAR
> (:HI-MOM T)  CFFI-TESTS::DEREF.UNSIGNED-CHAR
> (:HI-MOM T)  CFFI-TESTS::DEREF.SHORT
> (:HI-MOM T)  CFFI-TESTS::DEREF.UNSIGNED-SHORT
> (:HI-MOM T)  CFFI-TESTS::DEREF.INT
> (:HI-MOM T)  CFFI-TESTS::DEREF.UNSIGNED-INT
> (:HI-MOM T)  CFFI-TESTS::DEREF.LONG
> (:HI-MOM T)  CFFI-TESTS::DEREF.UNSIGNED-LONG
> (:HI-MOM T)  CFFI-TESTS::DEREF.FLOAT.1
> (:HI-MOM T)
> Test CFFI-TESTS::DEREF.FLOAT.2 failed
> Form: (CFFI:WITH-FOREIGN-OBJECT (CFFI-TESTS::P :FLOAT) (SETF 
> (CFFI:MEM-REF CFFI-TESTS::P :FLOAT) MOST-POSITIVE-SINGLE-FLOAT) 
> (CFFI:MEM-REF CFFI-TESTS::P :FLOAT))
> Expected value: 1.7976931348623157E308
> Actual value: +1D++0 #| +1D++0 is double-float plus-infinity |#.
>
> (:HI-MOM T)
> Test CFFI-TESTS::DEREF.FLOAT.3 failed
> Form: (CFFI:WITH-FOREIGN-OBJECT (CFFI-TESTS::P :FLOAT) (SETF 
> (CFFI:MEM-REF CFFI-TESTS::P :FLOAT) LEAST-POSITIVE-SINGLE-FLOAT) 
> (CFFI:MEM-REF CFFI-TESTS::P :FLOAT))
> Expected value: 4.9406564584124646E-324
> Actual value: 0.0.
>
> (:HI-MOM T)  CFFI-TESTS::DEREF.DOUBLE.1
> (:HI-MOM T)  CFFI-TESTS::DEREF.DOUBLE.2
> (:HI-MOM T)  CFFI-TESTS::DEREF.DOUBLE.3
> (:HI-MOM T)  CFFI-TESTS::DEREF.POINTER.NULL
> (:HI-MOM T)  CFFI-TESTS::LISP-STRING-TO-FOREIGN.EMPTY
> (:HI-MOM T)  CFFI-TESTS::WITH-FOREIGN-PTR.EVALX2
> (:HI-MOM T)  CFFI-TESTS::STRUCT.1
> (:HI-MOM T)  CFFI-TESTS::STRUCT.2
> (:HI-MOM T)  CFFI-TESTS::STRUCT.3
> (:HI-MOM T)  CFFI-TESTS::STRUCT.ALIGNMENT.1
> (:HI-MOM T)  CFFI-TESTS::STRUCT.ALIGNMENT.2
> (:HI-MOM T)  CFFI-TESTS::STRUCT.ALIGNMENT.3
> (:HI-MOM T)  CFFI-TESTS::STRUCT.ALIGNMENT.4
> (:HI-MOM T)  CFFI-TESTS::UNION.1
> (:HI-MOM T)  CFFI-TESTS::ENUM.1
> (:HI-MOM T)  CFFI-TESTS::ENUM.2
> (:HI-MOM T)  CFFI-TESTS::ENUM.3
> (:HI-MOM T)  CFFI-TESTS::ENUM.4
> (:HI-MOM T)  CFFI-TESTS::MISC-TYPES.STRING+PTR
> (:HI-MOM T)  CFFI-TESTS::MISC-TYPES.BOOLEAN
> (:HI-MOM T)  CFFI-TESTS::MISC-TYPES.WRAPPER
> 3 out of 71 total tests failed: CFFI-TESTS::CALLBACKS.STRING,
>    CFFI-TESTS::DEREF.FLOAT.2, CFFI-TESTS::DEREF.FLOAT.3.
> NIL
>
> CL-USER 2 > 



Luis Oliveira wrote:

> Hello,
>
> I have fixed a lame bug in cffi-corman.lisp and know it passes 64 out 
> of 71 tests (this includes the callbacks tests), which is pretty good. 
> At least 6 of these 7 failures should be easy to fix and I'll be 
> asking Roger Corman for help once I write some test cases by 
> translation the cffi declarations to native corman lisp FFI.
>
> That's the highlight of the following changes :-)
>
> Thu Sep 15 05:34:23 WEST 2005  Luis Oliveira <loliveira at common-lisp.net>
>   * Corman Lisp update and note added to the manual.
>
>   - Added note to the User Manual that it reflects what's in
>     cffi-luis, not the main branch.
>   - Updated cffi-corman.lisp and fixed a critical bug.
>     Now only 7 tests fail.
>
> Thu Sep 15 02:30:27 WEST 2005  Luis Oliveira <loliveira at common-lisp.net>
>   * Removed test, tweaked tests/Makefile
>
>   - Commented out the test STRUCT.ALIGNMENT.5 because an empty struct is
>     not valid standard C and some compilers, namely VC++, won't 
> compile it.
>   - Add -ansi -pedantic to the compiler flags to catch things like this
>     sooner next time.
>
> Thu Sep 15 01:14:14 WEST 2005  Luis Oliveira <loliveira at common-lisp.net>
>   * Missing DLLEXPORTs in libtest.c
>
> Wed Sep 14 21:32:04 WEST 2005  Luis Oliveira <loliveira at common-lisp.net>
>   * make clean -> rm *.fsl too.
>
> Wed Sep 14 01:25:07 WEST 2005  Luis Oliveira <loliveira at common-lisp.net>
>   * Documentation and new test
>
>   - Added detailed node listing to the User Manual.
>   - New regression test: WITH-FOREIGN-PTR.EVALX2 (checks if the size
>     argument is not evaluated twice by mistake)
>   - Also removed an old comment-out test function from 
> cffi-lispworks.lisp
>

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it."
    Elwood P. Dowd, "Harvey", 1950






More information about the cffi-devel mailing list