7 Commits

Author SHA1 Message Date
Matt Arsenault
5475cab729
StackProtector: Use LibcallLoweringInfo analysis (#170329) 2026-01-18 07:12:17 +01:00
Leonard Chan
94382c8e56 [llvm][StackProtector] Add noreturn to __stack_chk_fail call (#143976)
This is a reland for 99e53cb4139eda491f97cb33ee42ea424d352200 with the
appropriate test fixes.

It's possible for __stack_chk_fail to be an alias when using CrossDSOCFI
since it will make a jump table entry for this function and replace it
with an alias. StackProtector can crash since it always expects this to
be a regular function. Instead add the noreturn attribute to the call.
2025-07-16 13:12:28 -07:00
PiJoules
d882670d49
Revert "[llvm][StackProtector] Add noreturn to __stack_chk_fail call" (#144452)
Reverts llvm/llvm-project#143976

Reverting since this broke a builder:
https://lab.llvm.org/buildbot/#/builders/190/builds/21563
2025-06-16 16:34:40 -07:00
PiJoules
99e53cb413
[llvm][StackProtector] Add noreturn to __stack_chk_fail call (#143976)
It's possible for __stack_chk_fail to be an alias when using CrossDSOCFI
since it will make a jump table entry for this function and replace it
with an alias. StackProtector can crash since it always expects this to
be a regular function. Instead add the noreturn attribute to the call.
2025-06-16 15:47:43 -07:00
Paul Robinson
14945186c2 [SSP] [1/3] Revert "StackProtector: Use PointerMayBeCaptured"
"Captured" and "relevant to Stack Protector" are not the same thing.

This reverts commit f29366b1f594f48465c5a2754bcffac6d70fd0b1.
aka r363169.

Differential Revision: https://reviews.llvm.org/D67842

llvm-svn: 373216
2019-09-30 15:01:35 +00:00
Fangrui Song
ac14f7b10c [lit] Delete empty lines at the end of lit.local.cfg NFC
llvm-svn: 363538
2019-06-17 09:51:07 +00:00
Matt Arsenault
f29366b1f5 StackProtector: Use PointerMayBeCaptured
This was using its own, outdated list of possible captures. This was
at minimum not catching cmpxchg and addrspacecast captures.

One change is now any volatile access is treated as capturing. The
test coverage for this pass is quite inadequate, but this required
removing volatile in the lifetime capture test.

Also fixes some infrastructure issues to allow running just the IR
pass.

Fixes bug 42238.

llvm-svn: 363169
2019-06-12 14:23:33 +00:00