aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Cuda.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2025-01-21 09:24:41 +0000
committerGitHub <noreply@github.com>2025-01-21 09:24:41 +0000
commit5658bc4ae75497edc5ec7c934931c8681d33fac8 (patch)
treed0075987d67d2921b599f56f339cb35e6941457e /clang/lib/Basic/Cuda.cpp
parent547bfda56b2e3f3a4c6d2357d3566dcd3fa996ad (diff)
downloadllvm-5658bc4ae75497edc5ec7c934931c8681d33fac8.zip
llvm-5658bc4ae75497edc5ec7c934931c8681d33fac8.tar.gz
llvm-5658bc4ae75497edc5ec7c934931c8681d33fac8.tar.bz2
[lldb][Linux] Add Control Protection Fault signal (#122917)
This will be sent by Arm's Guarded Control Stack extension when an invalid return is executed. The signal does have an address we could show, but it's the PC at which the fault occured. The debugger has plenty of ways to show you that already, so I've left it out. ``` (lldb) c Process 460 resuming Process 460 stopped * thread #1, name = 'test', stop reason = signal SIGSEGV: control protection fault frame #0: 0x0000000000400784 test`main at main.c:57:1 54 afunc(); 55 printf("return from main\n"); 56 return 0; -> 57 } (lldb) dis <...> -> 0x400784 <+100>: ret ``` The new test case generates the signal by corrupting the link register then attempting to return. This will work whether we manually enable GCS or the C library does it for us. (in the former case you could just return from main and it would fault)
Diffstat (limited to 'clang/lib/Basic/Cuda.cpp')
0 files changed, 0 insertions, 0 deletions