[PATCH] D101016: [IR][sanitizer] Add module flag "frame-pointer" and set it for cc1 -mframe-pointer={non-leaf,all}

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 20:48:46 PDT 2021


MaskRay created this revision.
MaskRay added reviewers: Sanitizers, nickdesaulniers.
Herald added subscribers: dexonsmith, hiraditya.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

The Linux kernel objtool diagnostic `call without frame pointer save/setup`
arise in multiple instrumentation passes (asan/tsan/gcov). With the mechanism
introduced in D100251 <https://reviews.llvm.org/D100251>, it's trivial to respect the command line
-m[no-]omit-leaf-frame-pointer/-f[no-]omit-frame-pointer, so let's do it.

Fix: https://github.com/ClangBuiltLinux/linux/issues/1236 (tsan)
Fix: https://github.com/ClangBuiltLinux/linux/issues/1238 (asan)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101016

Files:
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/test/CodeGen/asan-frame-pointer.cpp
  llvm/include/llvm/IR/Module.h
  llvm/lib/IR/Function.cpp
  llvm/lib/IR/Module.cpp
  llvm/test/Instrumentation/AddressSanitizer/module-flags.ll
  llvm/test/Instrumentation/AddressSanitizer/uwtable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101016.339457.patch
Type: text/x-patch
Size: 4918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210422/9223ef13/attachment.bin>


More information about the llvm-commits mailing list