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

Unified Diff: src/IceASanInstrumentation.cpp

Issue 2068593003: Implemented linking to a dummy ASan runtime (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixed a python comment 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/IceASanInstrumentation.cpp
diff --git a/src/IceASanInstrumentation.cpp b/src/IceASanInstrumentation.cpp
index 45ec038f4ed91c596e7a5f9a7ee242096441973f..36ffaae0543ec60356cd3421f150ec9dc547515d 100644
--- a/src/IceASanInstrumentation.cpp
+++ b/src/IceASanInstrumentation.cpp
@@ -15,7 +15,9 @@
#include "IceASanInstrumentation.h"
#include "IceBuildDefs.h"
+#include "IceCfgNode.h"
#include "IceGlobalInits.h"
+#include "IceInst.h"
#include <sstream>
@@ -109,4 +111,16 @@ ASanInstrumentation::createRz(VariableDeclarationList *List,
return Rz;
}
+void ASanInstrumentation::instrumentStart(Cfg *Func) {
+ Constant *ShadowMemInit =
+ Ctx->getConstantExternSym(Ctx->getGlobalString("__asan_init"));
+ constexpr SizeT NumArgs = 0;
+ constexpr Variable *Void = nullptr;
+ constexpr bool HasTailCall = false;
Jim Stichnoth 2016/06/15 00:19:35 Newer code in Subzero uses a documentation idiom f
tlively 2016/06/15 16:32:00 Done.
+
+ auto *Call =
+ InstCall::create(Func, NumArgs, Void, ShadowMemInit, HasTailCall);
+ Func->getEntryNode()->getInsts().push_front(Call);
+}
+
} // end of namespace Ice
« pydir/szbuild.py ('K') | « src/IceASanInstrumentation.h ('k') | src/IceInstrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698