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

Unified Diff: src/IceInstrumentation.cpp

Issue 2086593002: Inserted local redzones. (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 b4229f6da5f41edd897546636e8050bdd8a4229c..64a6212c05c05aafeeb903c09e6f59a5d5396652 100644
--- a/src/IceInstrumentation.cpp
+++ b/src/IceInstrumentation.cpp
@@ -31,12 +31,16 @@ void Instrumentation::instrumentFunc(Cfg *Func) {
// TODO(tlively): More selectively instrument functions so that shadow memory
// represents user accessibility more and library accessibility less.
+ bool DidInstrumentStart = false;
LoweringContext Context;
Context.init(Func->getNodes().front());
- instrumentFuncStart(Context);
for (CfgNode *Node : Func->getNodes()) {
Context.init(Node);
while (!Context.atEnd()) {
+ if (!DidInstrumentStart) {
+ instrumentFuncStart(Context);
+ DidInstrumentStart = true;
+ }
instrumentInst(Context);
// go to next undeleted instruction
Context.advanceCur();

Powered by Google App Engine
This is Rietveld 408576698