summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-02-07 19:51:13 +0000
committerHans Wennborg <hans@hanshq.net>2018-02-07 19:51:13 +0000
commit5aa8942f65adf27e5786bded1cdffcc6cc3aa7d4 (patch)
treeb31ae89b4d12501d68156769ecf7769f79fe8bf1
parentMerging r324467 and r324468: (diff)
downloadllvm-project-5aa8942f65adf27e5786bded1cdffcc6cc3aa7d4.tar.gz
llvm-project-5aa8942f65adf27e5786bded1cdffcc6cc3aa7d4.tar.bz2
llvm-project-5aa8942f65adf27e5786bded1cdffcc6cc3aa7d4.zip
Merging r324496:llvmorg-6.0.0-rc2
------------------------------------------------------------------------ r324496 | yroux | 2018-02-07 19:27:25 +0100 (Wed, 07 Feb 2018) | 9 lines [asan] Fix filename size on linux platforms. This is a a fix for: https://bugs.llvm.org/show_bug.cgi?id=35996 Use filename limits from system headers to be synchronized with what LD_PRELOAD can handle. Differential Revision: https://reviews.llvm.org/D42900 ------------------------------------------------------------------------ llvm-svn: 324506
-rw-r--r--compiler-rt/lib/asan/asan_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_linux.cc b/compiler-rt/lib/asan/asan_linux.cc
index 047e1dbb72fa..625f32d408df 100644
--- a/compiler-rt/lib/asan/asan_linux.cc
+++ b/compiler-rt/lib/asan/asan_linux.cc
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <dlfcn.h>
#include <fcntl.h>
+#include <limits.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
@@ -214,7 +215,7 @@ void AsanCheckIncompatibleRT() {
// the functions in dynamic ASan runtime instead of the functions in
// system libraries, causing crashes later in ASan initialization.
MemoryMappingLayout proc_maps(/*cache_enabled*/true);
- char filename[128];
+ char filename[PATH_MAX];
MemoryMappedSegment segment(filename, sizeof(filename));
while (proc_maps.Next(&segment)) {
if (IsDynamicRTName(segment.filename)) {