Type error at sb-alien when SBCL compiled with fasteval

Bug #1731556 reported by Martin Saturka on 2017-11-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

Using current SBCL from git repo (1.4.1.103-442d898), under Ubuntu Linux 16.04LTS;

Try the example on using the DGEMM function from BLAS at
https://stackoverflow.com/questions/29822509/matrix-multiplication-using-blas-from-common-lisp

While it works at SBCL compiled without sb-fasteval:
sh make.sh --without-sb-fasteval --with-sb-eval --fancy

the example ending with:
----------------------------------------------
* (defparameter c (mm a b))

C
----------------------------------------------

and with correct values at c, it fails at the (mm a b) call when SBCL is compiled with sb-fasteval:
sh make.sh --with-sb-fasteval --without-sb-eval --fancy

the example fails at the end:
----------------------------------------------
* (defparameter c (mm a b))

debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {1001C08083}>:
  The value
    2
  is not of type
    (SB-ALIEN:ALIEN (* T))
  from the function type declaration.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-ALIEN-INTERNALS:%LOCAL-ALIEN-ADDR #<SB-ALIEN-INTERNALS:LOCAL-ALIEN-INFO (forced to stack) (SIGNED 32)> 2)
0]
----------------------------------------------

Douglas Katzman (dougk) wrote :

usually the fault lies with things that SB-ALIEN does, not the evaluator.
See also https://bugs.launchpad.net/sbcl/+bug/992362 and https://bugs.launchpad.net/sbcl/+bug/734259

Martin Saturka (kvutza) wrote :
Download full text (3.2 KiB)

Well, though this works with sb-eval contrary to the case of using sb-fasteval. That reminds me of another (past) issue that was alike at sb-fasteval only: https://bugs.launchpad.net/sbcl/+bug/1722715

Putting here backtrace if it can say something.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1001C08083}>
0: (SB-ALIEN-INTERNALS:%LOCAL-ALIEN-ADDR #<SB-ALIEN-INTERNALS:LOCAL-ALIEN-INFO (forced to stack) (SIGNED 32)> 2)
1: (SB-INTERPRETER::GLOBAL-CALL #(#<FUNCTION ALIEN-FUNCALL> #<sexpr DGEMM... #x1001C52F63> #<sexpr TRANSA... #x1001C52FA3> #<sexpr TRANSB... #x1001C52FE3> #<sexpr (ADDR M)... #x1001C53023> #<sexpr (ADDR N)... #x1001C53063> #<sexpr (ADDR K)... #x1001C530A3> #<sexpr (ADDR ALPHA)... #x1001C530E3> #<sexpr A... #x1001C53123> #<sexpr (ADDR LDA)... #x1001C53163> #<sexpr B... #x1001C531A3> #<sexpr (ADDR LDB)... #x1001C531E3> ...) #<SB-INTERPRETER::SYMBOL-MACRO-ENV {1001C52083}> #<unused argument>)
2: (PROGN #(#<sexpr (VALUES NIL)... #x1001C52153> #<sexpr (ALIEN-FUNCALL DGEMM TRANSA TR... #x1001C52123> #<sexpr (SETQ LDC #:INITVAL380)... #x1001C520F3>) #<SB-INTERPRETER::SYMBOL-MACRO-ENV {1001C52083}> #<unused argument>)
3: (SB-INTERPRETER::LET/SPEC #<SB-INTERPRETER::FRAME {1001C3EB73}> #<SB-INTERPRETER::SYMBOL-MACRO-ENV {1001C3EAA3}> #<unused argument>)
4: ((LABELS SB-INTERPRETER::LET*-BIND :IN SB-INTERPRETER::APPLY-LAMBDA) 13 13)
5: ((LAMBDA (&REST SB-INTERPRETER::ARGS) :IN SB-INTERPRETER::APPLICATOR/GENERAL) "n" "n" 2 2 3 1.0d0 #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X1001C37010 :TYPE (* DOUBLE-FLOAT)> 2 #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X1001C34C40 :TYPE (* DOUBLE-FLOAT)> 3 0.0d0 #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X1001C3B4B0 :TYPE (* DOUBLE-FLOAT)> 2)
6: ((LABELS SB-INTERPRETER::RECURSE :IN SB-SYS:WITH-PINNED-OBJECTS) (#<sexpr C... #x1001C3B633>) #<sexpr (DGEMM "n" "n" N M K 1.0d0 (PO... #x1001C3B673>)
7: ((LABELS SB-INTERPRETER::RECURSE :IN SB-SYS:WITH-PINNED-OBJECTS) (#<sexpr B... #x1001C3B5F3> #<sexpr C... #x1001C3B633>) #<sexpr (DGEMM "n" "n" N M K 1.0d0 (PO... #x1001C3B673>)
8: ((LABELS SB-INTERPRETER::RECURSE :IN SB-SYS:WITH-PINNED-OBJECTS) (#<sexpr A... #x1001C3B5B3> #<sexpr B... #x1001C3B5F3> #<sexpr C... #x1001C3B633>) #<sexpr (DGEMM "n" "n" N M K 1.0d0 (PO... #x1001C3B673>)
9: (PROGN (#<sexpr (SB-SYS:WITH-PINNED-OBJECTS (A... #x1001C3B533> . #<sexpr C... #x1001C3B563>) #<SB-INTERPRETER::VAR-ENV {1001C3B0B3}> #<unused argument>)
10: ((LABELS SB-INTERPRETER::LET*-BIND :IN SB-INTERPRETER::APPLY-LAMBDA) 2 2)
11: ((LAMBDA (&REST SB-INTERPRETER::ARGS) :IN SB-INTERPRETER::APPLICATOR/GENERAL) #2A((2.0d0 1.0d0 6.0d0) (7.0d0 3.0d0 4.0d0)) #2A((3.0d0 1.0d0) (6.0d0 5.0d0) (2.0d0 3.0d0)))
12: ((LABELS SB-INTERPRETER::APPLY-IT :IN SB-INTERPRETER::%EVAL) #<FUNCTION SB-IMPL::%DEFPARAMETER>)
13: (SB-INT:EVAL-IN-LEXENV (DEFPARAMETER C (MM A B)) NIL)
14: (EVAL (DEFPARAMETER C (MM A B)))
15: (INTERACTIVE-EVAL (DEFPARAMETER C (MM A B)) :EVAL NIL)
16: (SB-IMPL::REPL-FUN NIL)
17: ((LAMBDA NIL :IN SB-IMPL::TOPLEVEL-REPL))
18: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-IMPL::TOPLEVEL-REPL) {1001C1639B}>)
19: (SB-IMPL::TOPLEVEL-REPL NIL)
20: (SB-IMPL::TOPLEVEL-INIT)
21: ((FLET "WITHOUT-INTERRUPTS-BODY-35" :IN S...

Read more...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers