0

I have been working with the latest release of gcc (GCC 12.1, released May 6, 2022).

There is a new command-line option : -fsanitize=shadow-call-stack.

The documentation states:

GCC now supports the ShadowCallStack sanitizer, which can be enabled using the command-line option -fsanitize=shadow-call-stack. This sanitizer currently only works on AArch64 targets and it requires an environment in which all code has been compiled with -ffixed-r18. Its primary initial user is the Linux kernel.

I think it could be useful for one of the projects I am working on, but I would like to make sure I understand better the exact behaviour of this option. I found the documentation a little bit lacking. Can anyone explain its behaviour?

Lundin
  • 195,001
  • 40
  • 254
  • 396
DevShark
  • 8,558
  • 9
  • 32
  • 56
  • 1
    https://clang.llvm.org/docs/ShadowCallStack.html – KamilCuk Jun 14 '22 at 13:05
  • I've installed gcc 12.1 and when I try to use this option I get: sorry, unimplemented: ‘-fsanitize=shadow-call-stack’ not supported in current platform. Is there any information for which platform it should work? Because it doesn't work for x64. – Anton Kukoba Sep 29 '22 at 16:30

0 Answers0