diff options
author | Richard Levitte <levitte@openssl.org> | 2016-09-07 20:56:20 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-09-07 21:53:45 +0200 |
commit | 342a1a23793cb99921abeabe882adf8652ba715d (patch) | |
tree | c509817857c6056eb515fb30a1ba00989259e329 /util | |
parent | 978ecbb08be69864c2a85524eafbdb70487becb0 (diff) |
Allow asan, msan and ubsan to be configured with shared libraries
The background story is that util/shlib_wrap.sh was setting LD_PRELOAD
or similar platform dependent variables, just in case the shared
libraries were built with -rpath. Unfortunately, this doesn't work
too well with asan, msan or ubsan.
So, the solution is to forbid the combination of shared libraries,
-rpath and any of the sanity analyzers we can configure.
This changes util/shlib_wrap.sh so it only contains the code that sets
LD_PRELOAD when -rpath has been used when configuring.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/build.info | 2 | ||||
-rwxr-xr-x | util/shlib_wrap.sh.in (renamed from util/shlib_wrap.sh) | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/util/build.info b/util/build.info new file mode 100644 index 0000000000..616fbd7967 --- /dev/null +++ b/util/build.info @@ -0,0 +1,2 @@ +SCRIPTS_NO_INST=shlib_wrap.sh +SOURCE[shlib_wrap.sh]=shlib_wrap.sh.in diff --git a/util/shlib_wrap.sh b/util/shlib_wrap.sh.in index ce463f17e8..eff11417a5 100755 --- a/util/shlib_wrap.sh +++ b/util/shlib_wrap.sh.in @@ -81,6 +81,7 @@ SunOS|IRIX*) ;; esac +{- output_off() if $config{ex_libs} !~ /(^|\s)-Wl,-rpath,/; ""; -} if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then # Following three lines are major excuse for isolating them into # this wrapper script. Original reason for setting LD_PRELOAD @@ -96,6 +97,7 @@ if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then DYLD_INSERT_LIBRARIES="$LIBCRYPTOSO:$LIBSSLSO" # MacOS X export LD_PRELOAD _RLD_LIST DYLD_INSERT_LIBRARIES fi +{- output_on() if $config{ex_libs} !~ /(^|\s)-Wl,-rpath,/; ""; -} cmd="$1"; [ -x "$cmd" ] || cmd="$cmd${EXE_EXT}" shift |