Only blacklist the TSAN file when using clang compiler (#1713)
* Only use -fsanitize-blacklist with Clang * Instead check if the compiler flag exists * Remove deprecated exception specification warning * Didn't work, go back to checking for Clang * cleanup
This commit is contained in:
parent
50d50498dd
commit
2331c69d76
2 changed files with 9 additions and 3 deletions
|
|
@ -49,7 +49,10 @@ else ()
|
||||||
add_compile_options(-fsanitize=address,undefined,integer)
|
add_compile_options(-fsanitize=address,undefined,integer)
|
||||||
add_definitions(-DED25519_NO_INLINE_ASM)
|
add_definitions(-DED25519_NO_INLINE_ASM)
|
||||||
elseif (NANO_TSAN OR RAIBLOCKS_TSAN)
|
elseif (NANO_TSAN OR RAIBLOCKS_TSAN)
|
||||||
add_compile_options(-fsanitize=thread "-fsanitize-blacklist=${PROJECT_SOURCE_DIR}/tsan_blacklist")
|
add_compile_options(-fsanitize=thread)
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
add_compile_options("-fsanitize-blacklist=${PROJECT_SOURCE_DIR}/tsan_blacklist")
|
||||||
|
endif()
|
||||||
add_definitions(-DED25519_NO_INLINE_ASM)
|
add_definitions(-DED25519_NO_INLINE_ASM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -108,7 +111,10 @@ else ()
|
||||||
elseif (NANO_ASAN_INT OR RAIBLOCKS_ASAN_INT)
|
elseif (NANO_ASAN_INT OR RAIBLOCKS_ASAN_INT)
|
||||||
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=address,undefined,integer")
|
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=address,undefined,integer")
|
||||||
elseif (NANO_TSAN OR RAIBLOCKS_TSAN)
|
elseif (NANO_TSAN OR RAIBLOCKS_TSAN)
|
||||||
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=thread -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/tsan_blacklist")
|
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=thread")
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/tsan_blacklist")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ bool try_read (nano::stream & stream_a, T & value)
|
||||||
}
|
}
|
||||||
// A wrapper of try_read which throws if there is an error
|
// A wrapper of try_read which throws if there is an error
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void read (nano::stream & stream_a, T & value) throw (std::runtime_error)
|
void read (nano::stream & stream_a, T & value)
|
||||||
{
|
{
|
||||||
auto error = try_read (stream_a, value);
|
auto error = try_read (stream_a, value);
|
||||||
if (error)
|
if (error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue