diff --git a/ci_build_images/msan.fragment.Dockerfile b/ci_build_images/msan.fragment.Dockerfile index 03dda3db..fa6d1e33 100644 --- a/ci_build_images/msan.fragment.Dockerfile +++ b/ci_build_images/msan.fragment.Dockerfile @@ -23,7 +23,7 @@ ENV CXXFLAGS="$CFLAGS" # hadolint ignore=SC2046,DL3003 RUN . /etc/os-release \ - && export LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \ + && export LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \ && mkdir "$MSAN_LIBDIR" \ && curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-snapshot.gpg \ && if [ "$VERSION_CODENAME" = forky ]; then VERSION_CODENAME=unstable; LLVM_DEB=""; else LLVM_DEB="-$VERSION_CODENAME"; fi \ @@ -54,6 +54,7 @@ RUN . /etc/os-release \ && cd ll-build \ && cmake -S ../"$LLVM_DIR"*/runtimes \ -DCMAKE_BUILD_TYPE=Release \ + -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \ -DLLVM_ENABLE_RUNTIMES="${LLVM_ENABLE_RUNTIMES}" \ -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_ENABLE_SPHINX=OFF \ -DLLVM_USE_SANITIZER=MemoryWithOrigins \ @@ -63,13 +64,6 @@ RUN . /etc/os-release \ && cd .. \ && rm -rf -- * -RUN for f in "$MSAN_LIBDIR"/libunwind*; do mv "$f" "$f"-disable; done; \ - if [ "${CLANG_VERSION}" -ge 22 ]; then \ - apt-get -y install --no-install-recommends libunwind-19; \ - fi -# libunwind move/disable because of https://github.com/llvm/llvm-project/issues/128621 -# libunwind-19 meets ABI compatibility as its now linked to built executables. - COPY msan.instrumentedlibs.sh /msan-build RUN ./msan.instrumentedlibs.sh diff --git a/ci_build_images/msan.instrumentedlibs.sh b/ci_build_images/msan.instrumentedlibs.sh index b9b95f9b..55cba084 100755 --- a/ci_build_images/msan.instrumentedlibs.sh +++ b/ci_build_images/msan.instrumentedlibs.sh @@ -94,7 +94,7 @@ make -j "$(nproc)" cp -aL .libs/libxml2.so* "$MSAN_LIBDIR" rm -rf -- * -# Unixodbc used by MariaDB Connect engine. +# Unixodbc used by MariaDB Connect engine and C/ODBC. if [ "${VERSION_CODENAME}" = trixie ]; then # additional dependency in later debian versions. # libltdl-dev - System independent dlopen wrapper for GNU libtool @@ -107,9 +107,31 @@ aclocal autoheader autoconf automake --add-missing -./configure --enable-fastvalidate --with-pth=no --with-included-ltdl=no +./configure --enable-fastvalidate --with-pth=no --with-included-ltdl=yes make -j "$(nproc)" -mv ./DriverManager/.libs/libodbc.so* "$MSAN_LIBDIR" +find . +mv ./DriverManager/.libs/libodbc.so* ./odbcinst/.libs/libodbcinst.so* "$MSAN_LIBDIR" +rm -rf -- * + +##libltdl - C/ODBC +## libodbc does a fixed path load of /lib/x86_64-linux-gnu/libltdl.so.7, which +## isn't the instrumented version, so changed --with-included-ltdl=yes above. +#apt-get source libltdl-dev +#mv libtool-*/* . +#./bootstrap --force --no-git --skip-po --gnulib-srcdir=/usr/share/gnulib/ --copy +#./configure +#make -j "$(nproc)" +#mv ./libltdl/.libs/libltdl.so* "$MSAN_LIBDIR" +#rm -rf -- * + +# sqlite/odbc for CONNECT engine +apt-get source libsqliteodbc +mv sqliteodbc-*/* . +mk-build-deps -it 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' +autoreconf --install . +./configure +make -j "$(nproc)" +mv ./.libs/libsqlite3odbc.so* "$MSAN_LIBDIR" rm -rf -- * # libfmt - used by server for SFORMAT function