From 801730762f17302c33b70398b632aa1393c6722a Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 18 Oct 2008 08:22:16 +0000 Subject: [PATCH] 1.0.21.26: bullet-proof (?) use of LOAD-SHARED-OBJECT in tests * Previously LOAD-SHARED-OBJECT looked for the shared object first in the current directory, and if it existed there, it passed the absolute pathname to dlopen(). New version passes the native namestring of the designated pathname, absolute or relative -- which leads to dlopen() on some platforms not looking in the current directory unless "." is in LD_LIBRARY_PATH. So add TRUENAME calls to the test-suite when the .so lives there. * Mention the change of semantics in NEWS. * Delete trailing whitespace. --- NEWS | 4 ++++ src/code/foreign-load.lisp | 2 +- tests/foreign-stack-alignment.impure.lisp | 2 +- tests/foreign.test.sh | 10 +++++----- tests/threads.impure.lisp | 2 +- tests/win32-foreign-stack-unwind.impure.lisp | 2 +- version.lisp-expr | 2 +- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 32e66eb..918e282 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ ;;;; -*- coding: utf-8; -*- changes in sbcl-1.0.22 relative to 1.0.21: + * minor incompatible change: LOAD-SHARED-OBJECT no longer by default looks + for the shared object in the current directory, but passes the native + namestring of the designated pathname to the operation system's shared + object loading function as-it. * minor incompatible change: --disable-debugger toplevel option now takes effect before processing of initialization files and --eval or --load options. diff --git a/src/code/foreign-load.lisp b/src/code/foreign-load.lisp index 125210a..c8ee2ce 100644 --- a/src/code/foreign-load.lisp +++ b/src/code/foreign-load.lisp @@ -69,7 +69,7 @@ will be signalled when the core is saved -- this is orthogonal from DONT-SAVE." :test #'equal)) (obj (or old (make-shared-object :pathname pathname - :namestring (native-namestring + :namestring (native-namestring (translate-logical-pathname pathname) :as-file t))))) (setf (shared-object-dont-save obj) dont-save) diff --git a/tests/foreign-stack-alignment.impure.lisp b/tests/foreign-stack-alignment.impure.lisp index cdf8844..128d21f 100644 --- a/tests/foreign-stack-alignment.impure.lisp +++ b/tests/foreign-stack-alignment.impure.lisp @@ -60,7 +60,7 @@ #+darwin "-bundle" #-darwin "-shared" "-o" "stack-alignment-offset.so") -(load-shared-object "stack-alignment-offset.so") +(load-shared-object (truename "stack-alignment-offset.so")) (define-alien-routine stack-alignment-offset int (alignment int)) (define-alien-routine trampoline int (callback (function int))) diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index 8c8a79c..992ae86 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -127,8 +127,8 @@ cat > $TEST_FILESTEM.base.lisp < $TEST_FILESTEM.test.lisp < $TEST_FILESTEM.test.lisp <