Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: src/IceInstrumentation.cpp

Issue 2079723002: Instrumented malloc and free with dummy functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceInstrumentation.cpp
diff --git a/src/IceInstrumentation.cpp b/src/IceInstrumentation.cpp
index fc2a4a5431f454b2cc77fdba28e6fd1b05ad59ec..14a7e18d9662d2b38651046ae07ed770cf1bcbfc 100644
--- a/src/IceInstrumentation.cpp
+++ b/src/IceInstrumentation.cpp
@@ -29,6 +29,11 @@ void Instrumentation::instrumentFunc(Cfg *Func) {
assert(Func);
assert(!Func->getNodes().empty());
+ // TODO(tlively): Create a more precise blacklist than this
+ std::string FuncName = Func->getFunctionName().toStringOrEmpty();
+ if (FuncName.substr(0, 1) == "_" && FuncName != "_start")
+ return;
+
LoweringContext Context;
Context.init(Func->getNodes().front());
instrumentFuncStart(Context);
@@ -42,7 +47,7 @@ void Instrumentation::instrumentFunc(Cfg *Func) {
}
}
- if (Func->getFunctionName().toStringOrEmpty() == "_start")
+ if (FuncName == "_start")
instrumentStart(Func);
}

Powered by Google App Engine
This is Rietveld 408576698