diff --git a/deps/Boost/Boost.cmake b/deps/Boost/Boost.cmake index 96d8ecabc3..2b2487d599 100644 --- a/deps/Boost/Boost.cmake +++ b/deps/Boost/Boost.cmake @@ -77,9 +77,9 @@ set(_boost_flags "") if (UNIX) if (DEP_MSAN) set(_boost_flags - "cflags=-fPIC ${MSAN_CMAKE_C_FLAGS};" - "cxxflags=-fPIC ${MSAN_CMAKE_CXX_FLAGS};" - "linkflags=-fPIC ${MSAN_CMAKE_LD_FLAGS}") + "cflags=-fPIC ${MSAN_CMAKE_C_FLAGS} -fsanitize-blacklist=${CMAKE_CURRENT_LIST_DIR}/msan_ignorelist.txt;" + "cxxflags=-fPIC ${MSAN_CMAKE_CXX_FLAGS} -fsanitize-blacklist=${CMAKE_CURRENT_LIST_DIR}/msan_ignorelist.txt;" + "linkflags=-fPIC ${MSAN_CMAKE_LD_FLAGS} -fsanitize-blacklist=${CMAKE_CURRENT_LIST_DIR}/msan_ignorelist.txt") else() set(_boost_flags "cflags=-fPIC;cxxflags=-fPIC") endif() diff --git a/deps/Boost/msan_ignorelist.txt b/deps/Boost/msan_ignorelist.txt new file mode 100644 index 0000000000..9967c66586 --- /dev/null +++ b/deps/Boost/msan_ignorelist.txt @@ -0,0 +1,2 @@ +fun:_ZN5boost10filesystem6detail6statusERKNS0_4pathEPNS_6system10error_codeE +fun:_ZN5boost10filesystem6detail14symlink_statusERKNS0_4pathEPNS_6system10error_codeE \ No newline at end of file diff --git a/deps/CURL/CURL.cmake b/deps/CURL/CURL.cmake index e0d93fd9a8..9cfa9d56bb 100644 --- a/deps/CURL/CURL.cmake +++ b/deps/CURL/CURL.cmake @@ -54,6 +54,11 @@ else() set(_curl_static ON) endif() +set(_curl_msan_cmake_args ${MSAN_CMAKE_ARGS}) +if (DEP_MSAN) + list(TRANSFORM _curl_msan_cmake_args APPEND " -fsanitize-blacklist=${CMAKE_CURRENT_LIST_DIR}/msan_ignorelist.txt") +endif() + prusaslicer_add_cmake_project(CURL # GIT_REPOSITORY https://github.com/curl/curl.git # GIT_TAG curl-7_75_0 @@ -67,7 +72,7 @@ prusaslicer_add_cmake_project(CURL -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCURL_STATICLIB=${_curl_static} ${_curl_platform_flags} - ${MSAN_CMAKE_ARGS} + ${_curl_msan_cmake_args} ) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") diff --git a/deps/CURL/msan_ignorelist.txt b/deps/CURL/msan_ignorelist.txt new file mode 100644 index 0000000000..aaf2fd3243 --- /dev/null +++ b/deps/CURL/msan_ignorelist.txt @@ -0,0 +1,5 @@ +# False positive in https://github.com/curl/curl/blob/2f33be817cbce6ad7a36f27dd7ada9219f13584c/lib/select.c#L433 because FD_ZERO doesn't count as initialization https://github.com/google/sanitizers/issues/192. +# Another solution is unpoison affected variables, but it needs to apply a patch to CURL. +# https://stackoverflow.com/questions/20617788/using-memory-sanitizer-with-libstdc +# https://stackoverflow.com/questions/35665226/how-to-determine-when-fsanitize-memory-is-in-use +fun:Curl_poll \ No newline at end of file diff --git a/deps/MSan_Deps/Mesa3D/ignorelist.txt b/deps/MSan_Deps/Mesa3D/ignorelist.txt index 342b421199..46a2ae8391 100644 --- a/deps/MSan_Deps/Mesa3D/ignorelist.txt +++ b/deps/MSan_Deps/Mesa3D/ignorelist.txt @@ -52,4 +52,7 @@ fun:do_clip_tri fun:emit_vertex fun:cull_tri fun:clip_line -fun:do_clip_line \ No newline at end of file +fun:do_clip_line +fun:stipple_line +fun:emit_segment +fun:lines \ No newline at end of file diff --git a/deps/TBB/TBB.cmake b/deps/TBB/TBB.cmake index b730f5ff5a..bd513c8c84 100644 --- a/deps/TBB/TBB.cmake +++ b/deps/TBB/TBB.cmake @@ -1,3 +1,8 @@ +set(_tbb_msan_cmake_args ${MSAN_CMAKE_ARGS}) +if (DEP_MSAN) + list(TRANSFORM _tbb_msan_cmake_args APPEND " -fsanitize-blacklist=${CMAKE_CURRENT_LIST_DIR}/msan_ignorelist.txt") +endif() + prusaslicer_add_cmake_project( TBB URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz" @@ -9,7 +14,7 @@ prusaslicer_add_cmake_project( -DTBB_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_DEBUG_POSTFIX=_debug - ${MSAN_CMAKE_ARGS} + ${_tbb_msan_cmake_args} ) if (MSVC) diff --git a/deps/TBB/msan_ignorelist.txt b/deps/TBB/msan_ignorelist.txt new file mode 100644 index 0000000000..5d331c3eed --- /dev/null +++ b/deps/TBB/msan_ignorelist.txt @@ -0,0 +1,3 @@ +fun:_ZN3tbb8internal16custom_schedulerINS0_20IntelSchedulerTraitsEE18local_wait_for_allERNS_4taskEPS4_ +fun:_ZN3tbb8internal18cpu_ctl_env_helper7set_envEPKNS_18task_group_contextE +fun:_ZN3tbb18task_group_context16copy_fp_settingsERKS0_ \ No newline at end of file