From 2742792303c145f5606c53ae22ca73d53c71251d Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Mon, 17 Jan 2022 11:10:22 +0100
Subject: [PATCH] Intermediate Commit (2022-01-17 11:10)

---
 msan     | 11 +----------
 msan.org | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 10 deletions(-)
 create mode 100644 msan.org

diff --git a/msan b/msan
index b72795e0..6839e10f 100755
--- a/msan
+++ b/msan
@@ -35,7 +35,7 @@ export CXX="clang++"
 rm -rf build-msan
 
 CPP_ARGS="-stdlib=libc++ -I${INSTRUMENTED_LIBCXX_INC_DIR} -I${INSTRUMENTED_LIBCXX_INC_DIR}/c++/v1"
-CPP_LINK_ARGS="-L${INSTRUMENTED_LIBCXX_LIB_DIR} -Wl,--unresolved-symbols=ignore-all -lc++abi"
+CPP_LINK_ARGS="-L${INSTRUMENTED_LIBCXX_LIB_DIR} -Wl,--unresolved-symbols=ignore-in-shared-libs -lc++abi"
 
 # --unresolved-symbols=ignore-in-shared-libs
 # --unresolved-symbols=ignore-all
@@ -51,15 +51,6 @@ meson \
 	-Dcpp_link_args="${CPP_LINK_ARGS}" \
     build-msan
 
-# It appears that meson is filtering -stdlib=libc++ and always selects
-# the compilers default. Which is for clang often libstdc++, i.e., GCC
-# C++ standard library.
-# NOTE: We could potentially place a complete LLVM/Clang toolchain in
-# the CI container, that has the sanitizers enabled.
-# sed --in-place \
-# 	s/clang++/clang++ -stdlib=libc++/ \
-# 	build-msan/build.ninja
-
 export LD_LIBRARY_PATH="${INSTRUMENTED_LIBCXX_LIB_DIR}"
 
 ninja -C build-msan
diff --git a/msan.org b/msan.org
new file mode 100644
index 00000000..a5b3205d
--- /dev/null
+++ b/msan.org
@@ -0,0 +1,27 @@
+on laptop
+
+ninja: Entering directory `build-msan'
+[1/140] clang++ -Iemper/libemper.so.p -Iemper -I../emper -Iemper/io -I../emper/io -Iemper/include -I../e
+mper/include -I/usr/include -I/home/flo/repos/llvm-13.0.0/build/include -I/home/flo/repos/llvm-13.0.0/bu
+ild/include/c++/v1 -fcolor-diagnostics -fsanitize=memory -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wno
+n-virtual-dtor -Wextra -Wpedantic -Werror -std=c++2a -O0 -g -stdlib=libc++ -fPIC -DBOOST_ALL_NO_LIB -pth
+read -MD -MQ emper/libemper.so.p/CallerEnvironment.cpp.o -MF emper/libemper.so.p/CallerEnvironment.cpp.o
+.d -o emper/libemper.so.p/CallerEnvironment.cpp.o -c ../emper/CallerEnvironment.cpp
+FAILED: emper/libemper.so.p/CallerEnvironment.cpp.o
+clang++ -Iemper/libemper.so.p -Iemper -I../emper -Iemper/io -I../emper/io -Iemper/include -I../emper/inc
+lude -I/usr/include -I/home/flo/repos/llvm-13.0.0/build/include -I/home/flo/repos/llvm-13.0.0/build/incl
+ude/c++/v1 -fcolor-diagnostics -fsanitize=memory -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtua
+l-dtor -Wextra -Wpedantic -Werror -std=c++2a -O0 -g -stdlib=libc++ -fPIC -DBOOST_ALL_NO_LIB -pthread -MD
+ -MQ emper/libemper.so.p/CallerEnvironment.cpp.o -MF emper/libemper.so.p/CallerEnvironment.cpp.o.d -o em
+per/libemper.so.p/CallerEnvironment.cpp.o -c ../emper/CallerEnvironment.cpp
+In file included from ../emper/CallerEnvironment.cpp:3:
+In file included from ../emper/CallerEnvironment.hpp:5:
+In file included from /home/flo/repos/llvm-13.0.0/build/include/c++/v1/iostream:37:
+In file included from /home/flo/repos/llvm-13.0.0/build/include/c++/v1/ios:214:
+In file included from /home/flo/repos/llvm-13.0.0/build/include/c++/v1/__locale:15:
+In file included from /home/flo/repos/llvm-13.0.0/build/include/c++/v1/string:519:
+In file included from /home/flo/repos/llvm-13.0.0/build/include/c++/v1/__debug:14:
+/home/flo/repos/llvm-13.0.0/build/include/c++/v1/iosfwd:222:14: error: use of undeclared identifier 'mbs
+tate_t'
+typedef fpos<mbstate_t>    streampos;
+             ^
-- 
GitLab