Chromium Code Reviews| Index: src/IceASanInstrumentation.h |
| diff --git a/src/IceASanInstrumentation.h b/src/IceASanInstrumentation.h |
| index ef212f5b6713010c16331db28f6e252f623adc52..db01d3c07b6370415b34adc9387cc36322c980d5 100644 |
| --- a/src/IceASanInstrumentation.h |
| +++ b/src/IceASanInstrumentation.h |
| @@ -26,6 +26,7 @@ |
| namespace Ice { |
| using VarSizeMap = std::unordered_map<Operand *, SizeT>; |
| +using GlobalSizeMap = std::unordered_map<GlobalString, SizeT>; |
| class ASanInstrumentation : public Instrumentation { |
| ASanInstrumentation() = delete; |
| @@ -33,7 +34,8 @@ class ASanInstrumentation : public Instrumentation { |
| ASanInstrumentation &operator=(const ASanInstrumentation &) = delete; |
| public: |
| - ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), RzNum(0) { |
| + ASanInstrumentation(GlobalContext *Ctx) |
| + : Instrumentation(Ctx), GlobalSizes(), RzNum(0) { |
|
Jim Stichnoth
2016/07/27 13:19:34
You probably don't need to explicitly specify the
tlively
2016/07/27 18:32:36
Done.
|
| ICE_TLS_INIT_FIELD(LocalVars); |
| ICE_TLS_INIT_FIELD(LocalDtors); |
| } |
| @@ -41,6 +43,7 @@ public: |
| private: |
| std::string nextRzName(); |
| + bool isOkGlobalAccess(Operand *Op, SizeT Size); |
| bool isInstrumentable(Cfg *Func) override; |
| void instrumentFuncStart(LoweringContext &Context) override; |
| void instrumentCall(LoweringContext &Context, InstCall *Instr) override; |
| @@ -53,6 +56,7 @@ private: |
| void finishFunc(Cfg *Func) override; |
| ICE_TLS_DECLARE_FIELD(VarSizeMap *, LocalVars); |
| ICE_TLS_DECLARE_FIELD(std::vector<InstCall *> *, LocalDtors); |
| + GlobalSizeMap GlobalSizes; |
| std::atomic<uint32_t> RzNum; |
| bool DidProcessGlobals = false; |
| SizeT RzGlobalsNum = 0; |