HomeSort by relevance Sort by last modified time
    Searched full:crt_malloc (Results 1 - 1 of 1) sorted by null

  /external/compiler-rt/lib/asan/
asan_malloc_win.cc 123 char *crt_malloc; local
124 if (GetRealFunctionAddress("malloc", (void**)&crt_malloc)) {
127 CHECK(VirtualProtect(crt_malloc, 16, PAGE_EXECUTE_READWRITE, &old_prot));
128 REAL(memset)(crt_malloc, 0xCC /* int 3 */, 16); // just in case.
130 ptrdiff_t jmp_offset = (char*)malloc - (char*)crt_malloc - 5;
131 crt_malloc[0] = 0xE9; // jmp, should be followed by an offset.
132 REAL(memcpy)(crt_malloc + 1, &jmp_offset, sizeof(jmp_offset));
134 CHECK(VirtualProtect(crt_malloc, 16, old_prot, &unused));

Completed in 31 milliseconds