Home | History | Annotate | Download | only in asan

Lines Matching refs:Global

31 typedef __asan_global Global;
34 const Global *g;
44 Global g;
54 Global *g_first, *g_last;
59 ALWAYS_INLINE void PoisonShadowForGlobal(const Global *g, u8 value) {
63 ALWAYS_INLINE void PoisonRedZones(const Global &g) {
84 static void ReportGlobal(const Global &g, const char *prefix) {
85 Report("%s Global[%p]: beg=%p size=%zu/%zu name=%s module=%s dyn_init=%zu\n",
95 static u32 FindRegistrationSite(const Global *g) {
106 int GetGlobalsForAddress(uptr addr, Global *globals, u32 *reg_sites,
112 const Global &g = *l->g;
127 Global g = {};
132 descr->region_kind = "global";
143 // Check ODR violation for given global G via special ODR indicator. We use
144 // this method in case compiler instruments global variables through their
146 static void CheckODRViolationViaIndicator(const Global *g) {
163 // Check ODR violation for given global G by checking if it's already poisoned.
164 // We use this method in case compiler doesn't use private aliases for global
166 static void CheckODRViolationViaPoisoning(const Global *g) {
168 // This check may not be enough: if the first global is much larger
169 // the entire redzone of the second global may be within the first global.
180 // Clang provides two different ways for global variables protection:
181 // it can poison the global itself or its private alias. In former
184 // global, we have ODR violation error.
187 // In either case, compiler provides a special odr_indicator field to Global
190 // corresponding indicator variable for given global.
191 // 2) Zero. This means that we don't use private aliases for global variables
196 static inline bool UseODRIndicator(const Global *g) {
202 // Register a global variable.
203 // This function may be called more than once for every global
205 static void RegisterGlobal(const Global *g) {
212 Report("The following global variable is not properly aligned.\n");
213 Report("This may happen if another global with the same name\n");
215 Report("Or the global comes from a C file built w/o -fno-common.\n");
246 static void UnregisterGlobal(const Global *g) {
256 // We unpoison the shadow memory for the global but we do not remove it from
274 const Global *g = &dyn_g.g;
275 // Unpoison the whole global.
338 // poisons all global variables not defined in this TU, so that a dynamic
339 // initializer can only touch global variables in the same TU.
353 const Global *g = &dyn_g.g;
375 const Global *g = &dyn_g.g;
377 // Unpoison the whole global.