Lines Matching full:globals
11 // Handle globals.
51 // We want to remember where a certain range of globals was registered.
175 int GetGlobalsForAddress(uptr addr, Global *globals, u32 *reg_sites,
185 internal_memcpy(&globals[res], &g, sizeof(g));
270 // so we store the globals in a map.
290 // where two globals with the same name are defined in different modules.
343 // We can spoil names of globals with C linkage, so use an heuristic
390 // Apply __asan_register_globals to all globals found in the same loaded
391 // executable or shared library as `flag'. The flag tracks whether globals have
428 // Register an array of globals.
429 void __asan_register_globals(__asan_global *globals, uptr n) {
439 GlobalRegistrationSite site = {stack_id, &globals[0], &globals[n - 1]};
443 Printf("=== ID %d; %p %p\n", stack_id, (void *)&globals[0],
444 (void *)&globals[n - 1]);
447 if (SANITIZER_WINDOWS && globals[i].beg == 0) {
448 // The MSVC incremental linker may pad globals out to 256 bytes. As long
456 CHECK(globals[i].size == 0 && globals[i].size_with_redzone == 0 &&
457 globals[i].name == nullptr && globals[i].module_name == nullptr &&
458 globals[i].odr_indicator == 0);
461 RegisterGlobal(&globals[i]);
465 PoisonShadow(reinterpret_cast<uptr>(globals), n * sizeof(__asan_global),
469 // Unregister an array of globals.
471 void __asan_unregister_globals(__asan_global *globals, uptr n) {
475 if (SANITIZER_WINDOWS && globals[i].beg == 0) {
476 // Skip globals that look like padding from the MSVC incremental linker.
480 UnregisterGlobal(&globals[i]);
484 PoisonShadow(reinterpret_cast<uptr>(globals), n * sizeof(__asan_global), 0);
488 // when all dynamically initialized globals are unpoisoned. This method
504 // First call, poison all globals from other modules.
525 // executed at all we will have false reports on globals.
530 // calls` to be no-ops. However, to ensure all globals are unpoisoned before the
556 // Incremental poisoning is disabled, unpoison globals immediately.
561 // all dynamically initialized globals except for those defined in the current
562 // TU are poisoned. It simply unpoisons all dynamically initialized globals.