Lines Matching +full:ecx +full:- +full:1000

1 //===-- sanitizer_mac.cpp -------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // implements OSX-specific functions.
11 //===----------------------------------------------------------------------===//
18 // Use 64-bit inodes in file operations. ASan does not support OS X 10.5, so
19 // the clients will most certainly use 64-bit ones as well.
69 # include <mach-o/dyld.h>
117 // ---------------------- sanitizer_libc.h
132 if (fd == -1) {
196 return -1;
291 if (res == -1) return kInvalidFd;
321 // described by the file actions object. This is Darwin-specific extension.
362 for (; count > 0; count--) {
386 // ----------------- sanitizer_common.h
431 *stack_bottom = *stack_top - stacksize;
534 return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
581 *stk_size = stack_top - stack_bottom;
603 return common_flags()->handle_abort;
605 return common_flags()->handle_sigill;
607 return common_flags()->handle_sigtrap;
609 return common_flags()->handle_sigfpe;
611 return common_flags()->handle_segv;
613 return common_flags()->handle_sigbus;
623 if (result == kHandleSignalYes && !common_flags()->allow_user_segv_handler)
629 // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
642 u16 os_major = kernel_major - offset;
647 os_major -= 5;
697 // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
710 *major -= 5;
838 if (common_flags()->abort_on_error)
849 sizeof("AddressSanitizer") - 1) == 0)
852 sizeof("UndefinedBehaviorSanitizer") - 1) == 0)
855 sizeof("ThreadSanitizer") - 1) == 0)
860 if (common_flags()->log_to_syslog)
873 if (common_flags()->log_to_syslog)
883 return ucontext->uc_mcontext->__es.__err & 2 /*T_PF_WRITE*/ ? Write : Read;
886 return ucontext->uc_mcontext->__es.__esr & 0x40 /*ISS_DA_WNR*/ ? Write : Read;
894 // "Real" SIGSEGV codes (e.g., SEGV_MAPERR, SEGV_MAPERR) are non-zero.
895 return si->si_signo == SIGSEGV && si->si_code != 0;
901 (void *)arm_thread_state64_get_##r(ucontext->uc_mcontext->__ss), 0)
903 #define AARCH64_GET_REG(r) (uptr)ucontext->uc_mcontext->__ss.__##r
913 *pc = ucontext->uc_mcontext->__ss.__rip;
914 *bp = ucontext->uc_mcontext->__ss.__rbp;
915 *sp = ucontext->uc_mcontext->__ss.__rsp;
917 *pc = ucontext->uc_mcontext->__ss.__pc;
918 *bp = ucontext->uc_mcontext->__ss.__r[7];
919 *sp = ucontext->uc_mcontext->__ss.__sp;
921 *pc = ucontext->uc_mcontext->__ss.__eip;
922 *bp = ucontext->uc_mcontext->__ss.__ebp;
923 *sp = ucontext->uc_mcontext->__ss.__esp;
984 if (!common_flags()->verify_interceptors || !ShouldCheckInterceptors())
1033 if (!common_flags()->strip_env)
1065 // Iterate over colon-separated pieces of |dyld_insert_libraries|.
1073 if ((uptr)(piece_start - dyld_insert_libraries) > old_env_len) break;
1074 uptr piece_len = piece_end - piece_start;
1081 filename_len = piece_len - (filename_start - piece_start);
1155 const uptr ret_value = max_vm - 1;
1162 constexpr uptr fallback_max_vm = 0xffe00000 - 1;
1164 constexpr uptr fallback_max_vm = 0x200000000 - 1;
1175 constexpr uptr max_vm = (1ULL << 47) - 1; // 0x00007fffffffffffUL;
1178 constexpr uptr max_vm = (1ULL << 32) - 1; // 0xffffffff;
1223 high_mem_end = new_max_vm - 1;
1250 // 4KB on 32-bit and 4GB on 64-bit.
1275 // We found a free region [free_begin..address-1].
1278 uptr gap_size = gap_end > gap_start ? gap_end - gap_start : 0;
1304 Printf("%s = 0x%016llx ", #r, ucontext->uc_mcontext->__ss.__ ## r);
1308 Printf("%s = 0x%08x ", #r, ucontext->uc_mcontext->__ss.__ ## r);
1321 DUMPREG(eax); DUMPREG(ebx); DUMPREG(ecx); DUMPREG(edx); Printf("\n");
1358 "<%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-"
1375 Printf("%p-%p %s (%s) %s\n", (void *)modules[i].base_address(),
1417 // create -> start -> terminate -> destroy