<div dir="ltr"><div>This message has two audiences:  One the general CFFI group, and second the GSL maintainer.</div><div><br></div><div>This is using latest CCL and SBCL on 64-bit Windows 7, and MSYS2 running 64-bit MinGW and its GSL2.0 and 2.1.<br></div><div><div><br></div><div>Running GSL 2.0 and 2.1 under GSLL resulted in exception violations.  I could eliminate them by specifying the length of an integer as 8 instead of 4 bytes.  </div><div><br></div><div>My question has to do with the origin of this specification, since it is derived from CFFI and GSLL, not hard-coded.</div><div><br></div><div>Specifically, in GSLL, the following code in init/types.lisp:</div><div><div>(case (cffi:foreign-type-size :long)</div><div>  <i>(8 (push :int64 *features*))</i></div><div>  <b>(4 (push :int32 *features*))</b>)</div><div><br></div><div>evaluates to 4, pushing :int32 into *features*.  Here is some additional output of cffi:foreign-type-size on my machine:</div><div><br></div><div>GSL> (cffi:foreign-type-size :double)<br></div></div></div><div><div>8</div><div>GSL> (cffi:foreign-type-size :long)</div><div>4</div><div>GSL> (cffi:foreign-type-size :long-long)</div><div>8</div><div>GSL> (cffi:foreign-type-size :int)</div><div>4</div></div><div><br></div><div>This feature eventually makes its way to other code in GSLL.  In the Linear Algebra module, the function make-permutation (in data/permutation.lisp) has this line:</div><div><div><span class="" style="white-space:pre">  </span> (make-instance</div><div><span class="" style="white-space:pre">    </span>  'permutation</div><div><span class="" style="white-space:pre">        </span>  :element-type '(unsigned-byte <i>#+int64 64</i> <b>#+int32 32</b>)</div><div><span class="" style="white-space:pre">  </span>  :dimensions (if (typep n 'permutation) (grid:dimensions n) (list n)))))</div></div><div><br></div><div>In my environment element type resulted in unsigned-byte 32.</div><div><br></div><div>When I hard-coded my features to :int64 (and unsigned-byte 64), all the exception errors disappeared.</div><div><br></div><div>I hope this gives enough background to fix this error (either in my setup, gsll, or cffi).</div><div><br></div><div>Thanks,</div><div><br></div><div>Mirko</div></div>