mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Add UNDEFINED-ALIEN-FUNCTION-ERROR test for indirect calls
UNDEFINED-ALIEN-FUNCTION-ERROR should be able to report the undefined function name's when ALIEN-FUNCALLing indirectly via SB-SYS:FOREIGN-SYMBOL-ADDRESS which points to a linkage table trampoline.
This commit is contained in:
parent
50085a82c7
commit
316f4b7892
|
|
@ -534,6 +534,17 @@
|
||||||
(assert (typep c 'sb-kernel::undefined-alien-function-error))
|
(assert (typep c 'sb-kernel::undefined-alien-function-error))
|
||||||
(assert (equal (cell-error-name c) "bar")))))
|
(assert (equal (cell-error-name c) "bar")))))
|
||||||
|
|
||||||
|
(with-test (:name :undefined-alien-name-via-linkage-table-trampoline
|
||||||
|
:skipped-on (not (or :x86-64 :arm :arm64)))
|
||||||
|
(handler-case (funcall (checked-compile
|
||||||
|
`(lambda ()
|
||||||
|
(with-alien ((fn (* (function (values)))
|
||||||
|
(sb-sys:int-sap (sb-sys:foreign-symbol-address "baz"))))
|
||||||
|
(alien-funcall fn)))))
|
||||||
|
(t (c)
|
||||||
|
(assert (typep c 'sb-kernel::undefined-alien-function-error))
|
||||||
|
(assert (equal (cell-error-name c) "baz")))))
|
||||||
|
|
||||||
(defconstant fleem 3)
|
(defconstant fleem 3)
|
||||||
;; We used to expand into
|
;; We used to expand into
|
||||||
;; (SYMBOL-MACROLET ((FLEEM (SB-ALIEN-INTERNALS:%ALIEN-VALUE
|
;; (SYMBOL-MACROLET ((FLEEM (SB-ALIEN-INTERNALS:%ALIEN-VALUE
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue