summaryrefslogtreecommitdiff
path: root/external/firebird/UnpackedTarball_firebird.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-04-11 08:59:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-12 13:10:36 +0200
commit14955ed91b282ccbb395cb47c6d76e3b42b34748 (patch)
treeca10f393ba54fc0690f62611aeda73a46310a6b1 /external/firebird/UnpackedTarball_firebird.mk
parent61dd9cafab20af893204deaca81ef26c1e7f7bb0 (diff)
external/firebird: Support Clang ASan
First of all, LD_LIBRARY_PATH must not affect the make executable called for the firebird build. That would cause problems when that make executable depends on system versions of dynamic libraries that also happen to be available as LO- built versions on LD_LIBRARY_PATH: > make: symbol lookup error: /data/sbergman/lo-san/core/instdir/program/libfreebl3.so: undefined symbol: __asan_option_detect_stack_use_after_return > make: *** [/data/sbergman/lo-san/core/external/firebird/ExternalProject_firebird.mk:41: /data/sbergman/lo-san/core/workdir/ExternalProject/firebird/build] Error 127 For that, gb_Helper_extend_ld_path is now tunneled to the relevant places in the firebird build, where executables are called that use firebird's UnicodeUtil::getConversionICU (workdir/UnpackedTarball/firebird/src/common/unicode_util.cpp) to dynamically load icu libraries. (Similar to 3a2818280ad65c3d0aa9e720f62fec571713b2e7 "external/liblangtag: Tunnel LD_LIBRARY_PATH to where it's actually needed".) Then, what appears to work is to disable firebird's global operators new/delete (so that ASan's versions kick in). MemPool::{alloc,release}Raw would still be called at start-up through Firebird::GlobalPtr<Firebird::Mutex, (Firebird::InstanceControl::DtorPriority)3> ::GlobalPtr() calling Firebird::GlobalStorage::operator new(unsigned long), but there is already provision to avoid those functions' heavy machinery for the USE_VALGRIND case. DEBUG_GDS_ALLOC (which would enable other inopportune overloads of global operator new/delete) needs to be disabled in a somewhat contorted way, because 8ea07101c1613d213fd7cea17f094a947b14cd00 "external/firebird: Work around operator new alignment violations" might explicitly set it from the outside, which we need to undo for ASan builds. `make check screenshot` encountered one alloc-dealloc-mismatch (already during building firebird itself) that needs a patch to src/jrd/SimilarToMatcher.h. Change-Id: I6bb68604095908189259be14440f72d3b23cbd4e Reviewed-on: https://gerrit.libreoffice.org/52706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/firebird/UnpackedTarball_firebird.mk')
-rw-r--r--external/firebird/UnpackedTarball_firebird.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk
index fd780b964945..aaea3a5b4231 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/0002-Backported-fix-for-CORE-5452-Segfault-when-engine-s-.patch.1 \
external/firebird/c++17.patch \
external/firebird/ubsan.patch \
+ external/firebird/asan.patch \
))
ifeq ($(OS),WNT)