[PATCH] D87777: [ASAN] Properly deal with musttail calls in ASAN

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 17:53:46 PDT 2020


wenlei added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:562
+// point.
+static Instruction *adjustForMusttailCall(Instruction *I) {
+  ReturnInst *RI = dyn_cast<ReturnInst>(I);
----------------
lxfind wrote:
> wenlei wrote:
> > Is there a better place for this helper and avoid duplication? We have a few copies of it now, TSAN, ASAN and EntryExitInstrumenter...
> Yeah I have been wondering about this too. There are more duplicates than TSAN and ASAN.
> Do you have any suggestions? I couldn't find a good place for this.
Was thinking about something like building this into `SetInsertPoint` of IRBuilder, perhaps with an extra boolean argument with default value. But doesn't look like good layering there - might be too specific for IRBuilder. I'm fine with the way it is now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87777



More information about the llvm-commits mailing list