[llvm-commits] [compiler-rt] r149944 - /compiler-rt/trunk/lib/asan/asan_linux.cc
Kostya Serebryany
kcc at google.com
Mon Feb 6 16:47:35 PST 2012
Author: kcc
Date: Mon Feb 6 18:47:35 2012
New Revision: 149944
URL: http://llvm.org/viewvc/llvm-project?rev=149944&view=rev
Log:
[asan] don't crash if /proc/self/maps has enormous size (linux)
Modified:
compiler-rt/trunk/lib/asan/asan_linux.cc
Modified: compiler-rt/trunk/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_linux.cc?rev=149944&r1=149943&r2=149944&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_linux.cc Mon Feb 6 18:47:35 2012
@@ -131,7 +131,7 @@
inited = true;
size_t environ_size;
len = ReadFileToBuffer("/proc/self/environ",
- &environ, &environ_size, 1 << 20);
+ &environ, &environ_size, 1 << 26);
}
if (!environ || len == 0) return NULL;
size_t namelen = internal_strlen(name);
@@ -160,7 +160,7 @@
AsanProcMaps::AsanProcMaps() {
proc_self_maps_buff_len_ =
ReadFileToBuffer("/proc/self/maps", &proc_self_maps_buff_,
- &proc_self_maps_buff_mmaped_size_, 1 << 20);
+ &proc_self_maps_buff_mmaped_size_, 1 << 26);
CHECK(proc_self_maps_buff_len_ > 0);
// AsanWrite(2, proc_self_maps_buff_, proc_self_maps_buff_len_);
Reset();
More information about the llvm-commits
mailing list