;;;; -*- coding: utf-8; -*-
+changes in sbcl-1.0.17 relative to 1.0.16:
+ * bug fix: invalid optimization of heap-allocated alien variable
+ reference.
+
changes in sbcl-1.0.16 relative to 1.0.15:
* minor incompatible change: revert the changes to sb-posix's error
signaling added in 1.0.14.
The @var{type} must be some foreign pointer, array, or record type.
@end defun
-@defun sb-alien:alien-sap @var{foreign-value} @var{type}
+@defun sb-alien:alien-sap @var{foreign-value}
@findex alien-sap
The @code{sb-alien:alien-sap} function returns the @acronym{SAP} which
(deftransform %heap-alien-addr ((info) * * :important t)
(multiple-value-bind (sap type) (heap-alien-sap-and-type info)
(/noshow "in DEFTRANSFORM %HEAP-ALIEN-ADDR, creating %SAP-ALIEN")
- `(%sap-alien ,sap ',type)))
+ `(%sap-alien ,sap ',(make-alien-pointer-type :to type))))
+
\f
;;;; support for local (stack or register) aliens
EOF
check_status_maybe_lose "missing-so" $?
+# ADDR of a heap-allocated object
+cat > $TEST_FILESTEM.addr.heap.c <<EOF
+ struct foo
+ {
+ int x, y;
+ } a, *b;
+EOF
+
+build_so $TEST_FILESTEM.addr.heap
+
+run_sbcl <<EOF
+ (load-shared-object "$TEST_FILESTEM.addr.heap.so")
+ (define-alien-type foo (struct foo (x int) (y int)))
+
+ (define-alien-variable a foo)
+ (define-alien-variable b (* foo))
+ (funcall (compile nil '(lambda () (setq b (addr a)))))
+ (assert (sb-sys:sap= (alien-sap a) (alien-sap (deref b))))
+ (quit :unix-status $EXIT_LISP_WIN)
+EOF
+check_status_maybe_lose "ADDR of a heap-allocated object" $?
+
+
# success convention for script
exit $EXIT_TEST_WIN
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.16"
+"1.0.16.1"