[llvm-branch-commits] [compiler-rt-branch] r324506 - Merging r324496:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 7 11:51:14 PST 2018


Author: hans
Date: Wed Feb  7 11:51:13 2018
New Revision: 324506

URL: http://llvm.org/viewvc/llvm-project?rev=324506&view=rev
Log:
Merging r324496:
------------------------------------------------------------------------
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
------------------------------------------------------------------------

Modified:
    compiler-rt/branches/release_60/   (props changed)
    compiler-rt/branches/release_60/lib/asan/asan_linux.cc

Propchange: compiler-rt/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb  7 11:51:13 2018
@@ -1 +1 @@
-/compiler-rt/trunk:322588,323013,323039,323315
+/compiler-rt/trunk:322588,323013,323039,323315,324496

Modified: compiler-rt/branches/release_60/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_60/lib/asan/asan_linux.cc?rev=324506&r1=324505&r2=324506&view=diff
==============================================================================
--- compiler-rt/branches/release_60/lib/asan/asan_linux.cc (original)
+++ compiler-rt/branches/release_60/lib/asan/asan_linux.cc Wed Feb  7 11:51:13 2018
@@ -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)) {




More information about the llvm-branch-commits mailing list