summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-12-03 09:29:23 +0000
committerAlexey Samsonov <samsonov@google.com>2013-12-03 09:29:23 +0000
commit907eb5b630d40ecdbeeba7cba7801028b6aecb0e (patch)
tree395db756cc3af5d39dd74ae5290f31770755028d /compiler-rt
parent8dd33a27c302c3c49631f847a52b2e171656fc49 (diff)
downloadbcm5719-llvm-907eb5b630d40ecdbeeba7cba7801028b6aecb0e.tar.gz
bcm5719-llvm-907eb5b630d40ecdbeeba7cba7801028b6aecb0e.zip
[Sanitizer] Use more appropriate InternalScopedString in GetCodeRangeForFile
llvm-svn: 196264
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_posix.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
index ffe91df1a59..5438aca9468 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
@@ -230,12 +230,11 @@ void RawWrite(const char *buffer) {
bool GetCodeRangeForFile(const char *module, uptr *start, uptr *end) {
uptr s, e, off, prot;
- InternalMmapVector<char> fn(4096);
- fn.push_back(0);
+ InternalScopedString buff(4096);
MemoryMappingLayout proc_maps(/*cache_enabled*/false);
- while (proc_maps.Next(&s, &e, &off, &fn[0], fn.capacity(), &prot)) {
+ while (proc_maps.Next(&s, &e, &off, buff.data(), buff.size(), &prot)) {
if ((prot & MemoryMappingLayout::kProtectionExecute) != 0
- && internal_strcmp(module, &fn[0]) == 0) {
+ && internal_strcmp(module, buff.data()) == 0) {
*start = s;
*end = e;
return true;
OpenPOWER on IntegriCloud