The sanitizers use the versionned llvm-symbolizer provided by the llvm-X package (Closes: #753572)

This commit is contained in:
Sylvestre Ledru 2018-11-01 13:55:24 +01:00
parent 1514d189ff
commit f9bd1ba58d
3 changed files with 24 additions and 0 deletions

2
debian/changelog vendored
View File

@ -11,6 +11,8 @@ llvm-toolchain-7 (1:7-8) unstable; urgency=medium
(Closes: #909705)
* Add tests from old bugs to make sure they don't come back
(Closes: #889832, #827866)
* The sanitizers use the versionned llvm-symbolizer provided by the llvm-X package
(Closes: #753572)
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 20 Oct 2018 16:00:58 +0200

View File

@ -82,3 +82,4 @@ scan-build-clang-X.diff
hurd-lib_Support_Unix_Path.inc.diff
hurd-tools_llvm-shlib_CMakeLists.txt.diff
rustc-aarch64-test-failure.diff
symbolizer-path.diff

21
debian/patches/symbolizer-path.diff vendored Normal file
View File

@ -0,0 +1,21 @@
Index: llvm-toolchain-7-7/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
===================================================================
--- llvm-toolchain-7-7.orig/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
+++ llvm-toolchain-7-7/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
@@ -26,6 +26,7 @@
#include "sanitizer_symbolizer_internal.h"
#include "sanitizer_symbolizer_libbacktrace.h"
#include "sanitizer_symbolizer_mac.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_VERSION_MAJOR
#include <dlfcn.h> // for dlsym()
#include <errno.h>
@@ -481,7 +482,7 @@ static SymbolizerTool *ChooseExternalSym
return new(*allocator) AtosSymbolizer(found_path, allocator);
}
#endif // SANITIZER_MAC
- if (const char *found_path = FindPathToBinary("llvm-symbolizer")) {
+ if (const char *found_path = FindPathToBinary("llvm-symbolizer-"LLVM_VERSION_MAJOR)) {
VReport(2, "Using llvm-symbolizer found at: %s\n", found_path);
return new(*allocator) LLVMSymbolizer(found_path, allocator);
}