[PATCH] D110012: [asan] Fixed a bug causing a crash when redzone optimization kicked in on X86 with -asan-optimize-callbacks flag on.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 11:48:25 PDT 2021


eugenis added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:27014
     }
+    case llvm::Intrinsic::x86_asan_check_memaccess: {
+      // We need a frame pointer because this will get lowered to a Call.
----------------
Does the intrinsic have to be x86-specific? AFAIK it is fine to have x86-specific handling of a generic intrinsic.


================
Comment at: llvm/test/CodeGen/X86/asan-check-memaccess-or.ll:7
+; CHECK:              pushq   %rax
 ; CHECK:              callq   __asan_check_load1_rn[[RN1:.*]]
 ; CHECK-NEXT:         callq   __asan_check_store1_rn[[RN1]]
----------------
CHECK-NEXT, or CHECK-NOT: something-%rbp to make sure we are not force-enabling the frame pointer


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110012/new/

https://reviews.llvm.org/D110012



More information about the llvm-commits mailing list