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

Side by Side Diff: src/IceASanInstrumentation.h

Issue 2054943002: Implemented global redzones. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Moved variables to anonymous namespace. 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 unified diff | Download patch
OLDNEW
(Empty)
1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===//
2 //
3 // The Subzero Code Generator
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief Declares the AddressSanitizer instrumentation class.
12 ///
13 /// This class is responsible for inserting redzones around global and stack
14 /// variables, inserting code responsible for poisoning those redzones, and
15 /// performing any other instrumentation necessary to implement
16 /// AddressSanitizer.
17 ///
18 //===----------------------------------------------------------------------===//
19
20 #ifndef SUBZERO_SRC_ICEASANINSTRUMENTATION_H
21 #define SUBZERO_SRC_ICEASANINSTRUMENTATION_H
22
23 #include "IceGlobalInits.h"
24 #include "IceInstrumentation.h"
25
26 namespace Ice {
27
28 class ASanInstrumentation : public Instrumentation {
29 ASanInstrumentation() = delete;
30 ASanInstrumentation(const ASanInstrumentation &) = delete;
31 ASanInstrumentation &operator=(const ASanInstrumentation &) = delete;
32
33 public:
34 ASanInstrumentation(GlobalContext *Ctx)
35 : Instrumentation(Ctx), DidInsertRedZones(false), RzNum(0) {}
36 void instrumentGlobals(VariableDeclarationList &Globals) override;
37
38 private:
39 std::string nextRzName();
40 VariableDeclaration *createRz(VariableDeclarationList *List,
41 VariableDeclaration *RzArray,
42 SizeT &RzArraySize,
43 VariableDeclaration *Global);
44 bool DidInsertRedZones;
Jim Stichnoth 2016/06/10 22:38:33 You should be able to do this: bool DidInsertRed
tlively 2016/06/10 23:43:32 Done.
45 uint32_t RzNum;
46 };
47 } // end of namespace Ice
48
49 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698