Skip to content

Commit

Permalink
Try to disable leak sanitizer differently
Browse files Browse the repository at this point in the history
  • Loading branch information
patricia-gallardo committed Mar 20, 2022
1 parent a45d04c commit 953f42c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmake/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set_project_warnings()
if (CMAKE_BUILD_TYPE MATCHES Debug)
include(${CMAKE_CURRENT_LIST_DIR}/Sanitizers.cmake)
set(ENABLE_SANITIZER_ADDRESS YES)
if (NOT APPLE)
set(ENABLE_SANITIZER_LEAK YES)
endif()
# if (NOT APPLE)
# set(ENABLE_SANITIZER_LEAK YES)
# endif()
set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR YES)
enable_sanitizers()
endif ()
3 changes: 0 additions & 3 deletions src/z_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ static bool ClearCache(int size) {
// Z_Malloc
// You can pass a nullptr user if the tag is < PU_PURGELEVEL.
//
#ifndef _WIN32
__attribute__((disable_sanitizer_instrumentation))
#endif
void * Z_Malloc(int size, int tag, void * user) {
if (tag < 0 || tag >= PU_NUM_TAGS || tag == PU_FREE) {
I_Error("Z_Malloc: attempted to allocate a block with an invalid "
Expand Down

0 comments on commit 953f42c

Please sign in to comment.