Skip to content

Commit

Permalink
0.9.2.30: oops, missed one
Browse files Browse the repository at this point in the history
  * rename one more call to FOREIGN-SYMBOL-ADDRESS-AS-INTEGER
  * fix foreign.test.sh to actually fail when we can't load stuff
     properly.
  • Loading branch information
nikodemus committed Jul 5, 2005
1 parent 1714224 commit 5827ad0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/code/fop.lisp
Expand Up @@ -715,6 +715,6 @@ bug.~:@>")
(read-n-bytes *fasl-input-stream* sym 0 len)
(sb!vm:fixup-code-object code-object
(read-word-arg)
(foreign-symbol-address-as-integer sym t)
(foreign-symbol-address sym t)
kind)
code-object))
17 changes: 11 additions & 6 deletions tests/foreign.test.sh
Expand Up @@ -27,10 +27,10 @@ testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$

build_so() {
echo building $1.so
if [ $(uname -m) = x86_64 ]; then
if [ "$(uname -m)" = x86_64 ]; then
CFLAGS="$CFLAGS -fPIC"
fi
if [ $(uname) = Darwin ]; then
if [ "$(uname)" = Darwin ]; then
SO_FLAGS="-bundle"
else
SO_FLAGS="-shared"
Expand Down Expand Up @@ -84,6 +84,10 @@ cat > $testfilestem.def.lisp <<EOF
(define-alien-routine "negative_int" int)
(define-alien-routine "negative_long" long)
;; compiling this gets us the FOP-FOREIGN-DATAREF-FIXUP on
;; linkage-table ports
(defvar *extern* (extern-alien "negative_short" short))
;; Test that loading an object file didn't screw up our records
;; of variables visible in runtime. (This was a bug until
;; Nikodemus Siivola's patch in sbcl-0.8.5.50.)
Expand Down Expand Up @@ -149,8 +153,9 @@ cat > $testfilestem.test.lisp <<EOF
(sb-ext:quit :unix-status 52) ; success convention for Lisp program
EOF

${SBCL:-sbcl} --eval "(progn (compile-file #p\"$testfilestem.def.lisp\") (sb-ext:quit :unix-status 52))"
if [ $? = 52 ] ; then :
${SBCL:-sbcl} --eval "(progn (load (compile-file #p\"$testfilestem.def.lisp\")) (sb-ext:quit :unix-status 52))"
if [ $? = 52 ]; then
true # nop
else
# we can't compile the test file. something's wrong.
rm $testfilestem.*
Expand Down Expand Up @@ -183,7 +188,7 @@ fi

echo table ok

$SBCL_ALLOWING_CORE --core $testfilestem.core --sysinit /dev/null --userinit /dev/null --load $testfilestem.test.lisp
${SBCL_ALLOWING_CORE:-sbcl} --core $testfilestem.core --sysinit /dev/null --userinit /dev/null --load $testfilestem.test.lisp
if [ $? != 52 ]; then
rm $testfilestem.*
echo test failed: $?
Expand All @@ -194,7 +199,7 @@ echo start ok

# missing object file
rm $testfilestem-b.so $testfilestem-b2.so
$SBCL_ALLOWING_CORE --core $testfilestem.core --sysinit /dev/null --userinit /dev/null <<EOF
${SBCL_ALLOWING_CORE:-sbcl} --core $testfilestem.core --sysinit /dev/null --userinit /dev/null <<EOF
(assert (= 22 (summish 10 11)))
(multiple-value-bind (val err) (ignore-errors (eval 'foo))
(assert (not val))
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -17,4 +17,4 @@
;;; 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".)
"0.9.2.29"
"0.9.2.30"

0 comments on commit 5827ad0

Please sign in to comment.