File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -960,7 +960,18 @@ static void DisableMmapExcGuardExceptions() {
960960 RTLD_DEFAULT, " task_set_exc_guard_behavior" );
961961 if (set_behavior == nullptr ) return ;
962962 const task_exc_guard_behavior_t task_exc_guard_none = 0 ;
963- set_behavior (mach_task_self (), task_exc_guard_none);
963+ kern_return_t res = set_behavior (mach_task_self (), task_exc_guard_none);
964+ if (res != KERN_SUCCESS) {
965+ Report (
966+ " WARN: AddressSanitizer: task_set_exc_guard_behavior returned %d (%s), "
967+ " mmap may fail unexpectedly.\n " ,
968+ res, mach_error_string (res));
969+ if (res == KERN_DENIED) {
970+ Report (
971+ " HINT: Check that task_set_exc_guard_behavior is allowed by "
972+ " sandbox.\n " );
973+ }
974+ }
964975}
965976
966977static void VerifyInterceptorsWorking ();
You can’t perform that action at this time.
0 commit comments