Lines Matching full:global

31 typedef __asan_global Global;  typedef
34 const Global *g;
43 Global g;
53 Global *g_first, *g_last;
58 ALWAYS_INLINE void PoisonShadowForGlobal(const Global *g, u8 value) { in PoisonShadowForGlobal()
62 ALWAYS_INLINE void PoisonRedZones(const Global &g) { in PoisonRedZones()
82 static void ReportGlobal(const Global &g, const char *prefix) { in ReportGlobal()
86 "%s Global[%p]: beg=%p size=%zu/%zu name=%s source=%s module=%s " in ReportGlobal()
96 // Fallback to Global::gcc_location in ReportGlobal()
101 static u32 FindRegistrationSite(const Global *g) { in FindRegistrationSite()
112 int GetGlobalsForAddress(uptr addr, Global *globals, u32 *reg_sites, in GetGlobalsForAddress()
118 const Global &g = *l->g; in GetGlobalsForAddress()
138 // Check ODR violation for given global G via special ODR indicator. We use
139 // this method in case compiler instruments global variables through their
141 static void CheckODRViolationViaIndicator(const Global *g) { in CheckODRViolationViaIndicator()
161 // Check ODR violation for given global G by checking if it's already poisoned.
162 // We use this method in case compiler doesn't use private aliases for global
164 static void CheckODRViolationViaPoisoning(const Global *g) { in CheckODRViolationViaPoisoning()
166 // This check may not be enough: if the first global is much larger in CheckODRViolationViaPoisoning()
167 // the entire redzone of the second global may be within the first global. in CheckODRViolationViaPoisoning()
178 // Clang provides two different ways for global variables protection:
179 // it can poison the global itself or its private alias. In former
182 // global, we have ODR violation error.
185 // In either case, compiler provides a special odr_indicator field to Global
188 // corresponding indicator variable for given global.
189 // 2) Zero. This means that we don't use private aliases for global variables
194 static inline bool UseODRIndicator(const Global *g) { in UseODRIndicator()
198 // Register a global variable.
199 // This function may be called more than once for every global
201 static void RegisterGlobal(const Global *g) { in RegisterGlobal()
208 Report("The following global variable is not properly aligned.\n"); in RegisterGlobal()
209 Report("This may happen if another global with the same name\n"); in RegisterGlobal()
211 Report("Or the global comes from a C file built w/o -fno-common.\n"); in RegisterGlobal()
242 static void UnregisterGlobal(const Global *g) { in UnregisterGlobal()
252 // We unpoison the shadow memory for the global but we do not remove it from in UnregisterGlobal()
270 const Global *g = &dyn_g.g; in StopInitOrderChecking()
271 // Unpoison the whole global. in StopInitOrderChecking()
292 // Check if the global is a zero-terminated ASCII string. If so, print it.
309 // Fallback to Global::gcc_location in PrintGlobalLocation()
393 // If these are padding bytes, the rest of the global should be zero. in __asan_register_globals()
427 // poisons all global variables not defined in this TU, so that a dynamic
428 // initializer can only touch global variables in the same TU.
442 const Global *g = &dyn_g.g; in __asan_before_dynamic_init()
465 const Global *g = &dyn_g.g; in __asan_after_dynamic_init()
467 // Unpoison the whole global. in __asan_after_dynamic_init()