From 92566d91406bf4a4de6f3e84a431a3fc178005c1 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 15 Nov 2024 18:20:17 +1100 Subject: [PATCH] msan: remove openssl instrumented Didn't instrument sufficiently. MSAN errors resultin the form: ==9000==WARNING: MemorySanitizer: use-of-uninitialized-value [Detaching after fork from child process 9003] #0 0x55c87cbda03f in my_base64_encode /source/mysys/base64.c:113:13 #1 0x55c87af96efb in calculate_server_uid(char*) /source/sql/mysqld.cc:9889:3 #2 0x55c87af96efb in init_common_variables() /source/sql/mysqld.cc:3882:7 #3 0x55c87af9111e in mysqld_main(int, char**) /source/sql/mysqld.cc:5546:7 #4 0x7f6d94ab5249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: c047672cae7964324658491e7dee26748ae5d2f8) #5 0x7f6d94ab5304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304) (BuildId: c047672cae7964324658491e7dee26748ae5d2f8) #6 0x55c87aeef130 in _start (/build/sql/mariadbd+0x6ee130) (BuildId: abe0c6d0a0f0bdcee26c5e1f69353335cca3bd8a) The sha1 has that is being encoded wasn't maked as initialized though the openssl libs wrote the hash there. --- ci_build_images/msan.Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ci_build_images/msan.Dockerfile b/ci_build_images/msan.Dockerfile index 71940160..0d393ea5 100644 --- a/ci_build_images/msan.Dockerfile +++ b/ci_build_images/msan.Dockerfile @@ -137,12 +137,6 @@ RUN . /etc/os-release \ && cmake --build build \ && mv build/libfmt.so* $MSAN_LIBDIR \ && rm -rf -- * \ - && apt-get source libssl-dev \ - && mv openssl-*/* . \ - && ./Configure shared no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms no-capieng no-rdrand $(if [ "${CLANG_VERSION}" = 19 ]; then echo no-asm enable-msan; fi) \ - && make -j "$(nproc)" build_libs \ - && mv ./*.so* $MSAN_LIBDIR \ - && rm -rf -- * \ && apt-get source libpcre2-dev \ && mv pcre2-*/* . \ && cmake -S . -B build/ -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DPCRE2_BUILD_TESTS=OFF -DPCRE2_SUPPORT_JIT=ON -DCMAKE_C_FLAGS="${CFLAGS} -Dregcomp=PCRE2regcomp -Dregexec=PCRE2regexec -Dregerror=PCRE2regerror -Dregfree=PCRE2regfree" \