Updated ignore lists for MemorySanitizer.

This commit is contained in:
Lukáš Hejl 2022-01-21 08:40:36 +01:00
parent 5b13b6f754
commit 27958885fb
7 changed files with 29 additions and 6 deletions

View File

@ -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()

2
deps/Boost/msan_ignorelist.txt vendored Normal file
View File

@ -0,0 +1,2 @@
fun:_ZN5boost10filesystem6detail6statusERKNS0_4pathEPNS_6system10error_codeE
fun:_ZN5boost10filesystem6detail14symlink_statusERKNS0_4pathEPNS_6system10error_codeE

View File

@ -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")

5
deps/CURL/msan_ignorelist.txt vendored Normal file
View File

@ -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

View File

@ -52,4 +52,7 @@ fun:do_clip_tri
fun:emit_vertex
fun:cull_tri
fun:clip_line
fun:do_clip_line
fun:do_clip_line
fun:stipple_line
fun:emit_segment
fun:lines

7
deps/TBB/TBB.cmake vendored
View File

@ -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)

3
deps/TBB/msan_ignorelist.txt vendored Normal file
View File

@ -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_