Periodically, I build the CogVM from source on FreeBSD. I've prevously mentioned that I had encountered some oddity with FFI on that platform. Still there today.
The following code crashes the VM/image:
| db |
db := SQLiteConnection fileNamed: '/tmp/x.db'.
db withResultForQuery: 'select * from a;'
do: [ :result |
result do: [ :row |
Transcript show: row asString; cr ]].
db close.
The oddity is that one particular version of the SqueakFFIPrims plugin works. Several other versions that I've built all fail. Overwriting the failed versions of the plugin with the known-working one allows that particular crashing VM's FFI to work.
-rwxr-xr-x 1 root wheel 77035 Oct 21 2012 ./4.0-2562/SqueakFFIPrims
-rwxr-xr-x 1 root wheel 77035 Oct 21 2012 ./4.0-2586/SqueakFFIPrims
-rwxr-xr-x 1 root wheel 74637 Nov 11 2012 ./4.0-2586/SqueakFFIPrims.broken
-rwxr-xr-x 1 root wheel 77035 Oct 21 2012 ./4.0-2779/SqueakFFIPrims
The working one appears here three times. I'm running FreeBSD 8.3.
Tags: FFI, FreeBSD