[PATCH] D42900: [asan] Fix filename size on linux platforms.

Yvan Roux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 10:29:48 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL324496: [asan] Fix filename size on linux platforms. (authored by yroux, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D42900?vs=132939&id=133248#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42900

Files:
  compiler-rt/trunk/lib/asan/asan_linux.cc


Index: compiler-rt/trunk/lib/asan/asan_linux.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc
+++ compiler-rt/trunk/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 @@
       // 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)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42900.133248.patch
Type: text/x-patch
Size: 818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180207/561d8ec5/attachment.bin>


More information about the llvm-commits mailing list