[Openmcl-devel] OpenMCL for Linux x86-64 available for testing

Gary Byers gb at clozure.com
Thu May 4 11:44:26 PDT 2006


Ahh.  My first guess is that when a call involves more than 8 float
arguments, the outgoing stack frame that's created is too small to
contain the FP args that're passed in memory.  This would presumably
trash some other frames on the foreign stack, but we might not see
evidence of that until the thread started to exit.

Aside from being somewhere in the middle of a probably superfluous
cache-flushing routine in the lisp kernel, the address where you're
crashing - 0x410561 - looks like a plausible SINGLE-FLOAT.

The magic number on x86-64 is 8 (e.g., the first 8 FP args are
passed in registers), so any case involving more than 8 args is
suspect (or at least different from other cases.)

On Thu, 4 May 2006, James Bielman wrote:

> James Bielman <jamesjb at jamesjb.com> writes:
>
>> Also, I've noticed that I hit the kernel debugger sometimes when
>> quitting OpenMCL, but it's never been reproducible.  But, it does do
>> it every time after running the CFFI testsuite.  I can try to narrow
>> this down to a specific source file or test if that will help.
>
> Replying to myself here, the tests that seem to be the culprit are
> ones that pass a lot of floating-point arguments.  For example, if I
> uncomment this test, I get the exception when quitting:
>
> (deftest funcall.float26
>    (foreign-funcall "sum_float26"
>                     :float 5.0 :float 5.0 :float 5.0 :float 5.0 :float 5.0
>                     :float 5.0 :float 5.0 :float 5.0 :float 5.0 :float 5.0
>                     :float 5.0 :float 5.0 :float 5.0 :float 5.0 :float 5.0
>                     :float 5.0 :float 5.0 :float 5.0 :float 5.0 :float 5.0
>                     :float 5.0 :float 5.0 :float 5.0 :float 5.0 :float 5.0
>                     :float 5.0 :float)
>  130.0)
>
> FOREIGN-FUNCALL is (on OpenMCL) just a thin wrapper for EXTERNAL-CALL,
> and "sum_float26" is a C function that just adds up its 26
> (non-varargs) float arguments.  (IIRC the 26 had some significance WRT
> passing arguments in register vs stack on PPC.)
>
> There are other tests that do things like pass 26 doubles, or 127
> arguments of mixed types that also cause a similar crash.
>
> James
>
>



More information about the Openmcl-devel mailing list