[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

Peter Collingbourne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 14 15:22:04 PST 2022


pcc added a comment.

On the bug you have:

  define internal fastcc void @​_Z4callIiE4taskv.resume(%_Z4callIiE4taskv.Frame* noalias nonnull align 8 dereferenceable(24
      ) %FramePtr) #​1 prologue <{ i32, i32 }> <{ i32 846595819, i32 trunc (i64 sub (i64 ptrtoint (i8** @​1 to i64), i64 ptrtoint (void ()* @​_Z4callIiE4taskv to i64)) to i32) }> {...}

Is it possible for the C/C++ code to take the address of the function `_Z4callIiE4taskv.resume` and call it indirectly? If not, it seems like the right fix would be to arrange for the prologue data to be dropped on the `.resume` function instead of duplicating it there. I would also imagine that whatever signature you have on the `.resume` function would be incorrect since it appears that the coro splitting pass will use a different function signature for that function.

Note that D119296 <https://reviews.llvm.org/D119296> will have the same problem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115844



More information about the cfe-commits mailing list