You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/03/18 16:30:07 UTC
[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1050: DISPATCH-1844 Leak of sys_mutex
jiridanek commented on a change in pull request #1050:
URL: https://github.com/apache/qpid-dispatch/pull/1050#discussion_r597046371
##########
File path: cmake/RuntimeChecks.cmake
##########
@@ -106,9 +106,17 @@ elseif(RUNTIME_CHECK STREQUAL "asan")
message(FATAL_ERROR "libubsan not installed - address sanitizer not available")
endif(UBSAN_LIBRARY-NOTFOUND)
message(STATUS "Runtime memory checker: gcc/clang address sanitizers")
+ option(SANITIZE_3RD_PARTY "Detect leaks in 3rd party libraries used by Dispatch while running tests" OFF)
+ file (COPY "${CMAKE_SOURCE_DIR}/tests/lsan.supp" DESTINATION "${CMAKE_BINARY_DIR}/tests")
+ if (NOT SANITIZE_3RD_PARTY)
+ # Append wholesale library suppressions
+ # this is necessary if target system does not have debug symbols for these libraries installed
+ # and therefore the more specific suppressions do not match
+ file(APPEND "${CMAKE_BINARY_DIR}/tests/lsan.supp" "\nleak:/libpython2.*.so\nleak:/libpython3.*.so\n")
+ endif ()
set(SANITIZE_FLAGS "-g -fno-omit-frame-pointer -fsanitize=address,undefined")
set(RUNTIME_ASAN_ENV_OPTIONS "detect_leaks=true suppressions=${CMAKE_SOURCE_DIR}/tests/asan.supp")
- set(RUNTIME_LSAN_ENV_OPTIONS "suppressions=${CMAKE_SOURCE_DIR}/tests/lsan.supp")
+ set(RUNTIME_LSAN_ENV_OPTIONS "suppressions=${CMAKE_BINARY_DIR}/tests/lsan.supp")
Review comment:
Problem is, in the PR it is done the wrong way. CMake only copies the files when you run cmake to configure the build. If you later change the source file and rebuild, the copy won't be updated. I have to use `configure_file` in cmake to achieve that update, as Ganesh pointed out in the main (not-WIP) PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org