[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

Timothy Herchen via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 13:10:50 PST 2024


anematode wrote:

It's used 100+ more times through the macro `_RET_IP_`. https://elixir.bootlin.com/linux/latest/source/include/linux/instruction_pointer.h#L7

https://elixir.bootlin.com/linux/latest/source/include/linux/kasan.h#L164 has some example uses where `always_inline` is important for correctness.

https://elixir.bootlin.com/linux/latest/source/kernel/kcsan/core.c#L912 might be interesting? (This is way out of my depth.) Function isn't marked noinline and the return pointer is actually important. Also, many other functions in that file seem to be marked noinline, e.g. https://elixir.bootlin.com/linux/latest/source/kernel/kcsan/core.c#L1327, but not that one.

https://github.com/llvm/llvm-project/pull/82966


More information about the cfe-commits mailing list