print stackrace when using UBSAN
@@ -146,6 +146,12 @@ if(VESPA_USE_SANITIZER)
set(VESPA_SANITIZER_ENV "TSAN_OPTIONS=suppressions=${VESPA_SANITIZER_SUPPRESSIONS_FILE} history_size=7 detect_deadlocks=1 second_deadlock_stack=1")
endif()
endif()
+# Dump stack when finding issues in unit tests using undefined sanitizer
+if(VESPA_USE_SANITIZER)
+ if(VESPA_USE_SANITIZER STREQUAL "undefined")
+ set(VESPA_SANITIZER_ENV "UBSAN_OPTIONS=print_stacktrace=1")
+ endif()
+endif()
if(VESPA_LLVM_VERSION)
else()
