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

Unified Diff: src/IceASanInstrumentation.h

Issue 2086593002: Inserted local redzones. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Made RzNum atomic 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
« no previous file with comments | « runtime/szrt_asan.c ('k') | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceASanInstrumentation.h
diff --git a/src/IceASanInstrumentation.h b/src/IceASanInstrumentation.h
index e1222b4fff3b95d074dac2a16c44c87b27f4a9d4..2cf5c59cb7549fef67d14a0bc4580fda693a655f 100644
--- a/src/IceASanInstrumentation.h
+++ b/src/IceASanInstrumentation.h
@@ -31,7 +31,7 @@ class ASanInstrumentation : public Instrumentation {
ASanInstrumentation &operator=(const ASanInstrumentation &) = delete;
public:
- ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx) {}
+ ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), RzNum(0) {}
void instrumentGlobals(VariableDeclarationList &Globals) override;
private:
@@ -40,13 +40,17 @@ private:
VariableDeclaration *RzArray,
SizeT &RzArraySize,
VariableDeclaration *Global);
+ InstAlloca *createLocalRz(LoweringContext &Context, SizeT Size,
+ SizeT Alignment);
+ void instrumentFuncStart(LoweringContext &Context) override;
+ void instrumentAlloca(LoweringContext &Context, InstAlloca *Instr) override;
void instrumentCall(LoweringContext &Context, InstCall *Instr) override;
void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override;
void instrumentStore(LoweringContext &Context, InstStore *Instr) override;
void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size);
void instrumentStart(Cfg *Func) override;
bool DidInsertRedZones = false;
- uint32_t RzNum = 0;
+ std::atomic<uint32_t> RzNum;
};
} // end of namespace Ice
« no previous file with comments | « runtime/szrt_asan.c ('k') | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698