llvm-project/llvm/test/CodeGen/NVPTX/no-stack-protector-libcall-error.ll
Matt Arsenault 259a11db5e
StackProtector: Use RuntimeLibcalls to query libcall names (#147913)
The compiler should not introduce calls to arbitrary strings
that aren't defined in RuntimeLibcalls. Previously OpenBSD was
disabling the default __stack_chk_fail, but there was no record
of the alternative __stack_smash_handler function it emits instead.

This also avoids a random triple check in the pass.
2025-07-15 18:37:59 +09:00

11 lines
326 B
LLVM

; RUN: not opt -disable-output -mtriple=nvptx64-- -enable-selectiondag-sp=0 -passes=stack-protector %s 2>&1 | FileCheck %s
; CHECK: error: no libcall available for stack protector
define void @func() sspreq nounwind {
%alloca = alloca i32, align 4
call void @capture(ptr %alloca)
ret void
}
declare void @capture(ptr)