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

Side by Side Diff: src/IceASanInstrumentation.h

Issue 2095763002: Instrumented local variables and implemented runtime. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Made sort safe and fixed test to run Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « runtime/szrt_asan.c ('k') | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===// 1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 13 matching lines...) Expand all
24 #include "IceInstrumentation.h" 24 #include "IceInstrumentation.h"
25 25
26 namespace Ice { 26 namespace Ice {
27 27
28 class ASanInstrumentation : public Instrumentation { 28 class ASanInstrumentation : public Instrumentation {
29 ASanInstrumentation() = delete; 29 ASanInstrumentation() = delete;
30 ASanInstrumentation(const ASanInstrumentation &) = delete; 30 ASanInstrumentation(const ASanInstrumentation &) = delete;
31 ASanInstrumentation &operator=(const ASanInstrumentation &) = delete; 31 ASanInstrumentation &operator=(const ASanInstrumentation &) = delete;
32 32
33 public: 33 public:
34 ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), RzNum(0) {} 34 ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), RzNum(0) {
35 ICE_TLS_INIT_FIELD(LocalDtors);
36 }
35 void instrumentGlobals(VariableDeclarationList &Globals) override; 37 void instrumentGlobals(VariableDeclarationList &Globals) override;
36 38
37 private: 39 private:
38 std::string nextRzName(); 40 std::string nextRzName();
39 VariableDeclaration *createRz(VariableDeclarationList *List, 41 VariableDeclaration *createRz(VariableDeclarationList *List,
40 VariableDeclaration *RzArray, 42 VariableDeclaration *RzArray,
41 SizeT &RzArraySize, 43 SizeT &RzArraySize,
42 VariableDeclaration *Global); 44 VariableDeclaration *Global);
43 InstAlloca *createLocalRz(LoweringContext &Context, SizeT Size,
44 SizeT Alignment);
45 void instrumentFuncStart(LoweringContext &Context) override; 45 void instrumentFuncStart(LoweringContext &Context) override;
46 void instrumentAlloca(LoweringContext &Context, InstAlloca *Instr) override;
47 void instrumentCall(LoweringContext &Context, InstCall *Instr) override; 46 void instrumentCall(LoweringContext &Context, InstCall *Instr) override;
47 void instrumentRet(LoweringContext &Context, InstRet *Instr) override;
48 void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override; 48 void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override;
49 void instrumentStore(LoweringContext &Context, InstStore *Instr) override; 49 void instrumentStore(LoweringContext &Context, InstStore *Instr) override;
50 void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size); 50 void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size);
51 void instrumentStart(Cfg *Func) override; 51 void instrumentStart(Cfg *Func) override;
52 void finishFunc(Cfg *Func) override;
53 ICE_TLS_DECLARE_FIELD(std::vector<InstCall *> *, LocalDtors);
52 bool DidInsertRedZones = false; 54 bool DidInsertRedZones = false;
53 std::atomic<uint32_t> RzNum; 55 std::atomic<uint32_t> RzNum;
54 }; 56 };
55 } // end of namespace Ice 57 } // end of namespace Ice
56 58
57 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H 59 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H
OLDNEW
« 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