llvm-project/libc/src/compiler/__stack_chk_fail.h
Nick Desaulniers 24d44ff473
[libc] __stack_chk_fail post submit test failures (#75962)
Use a size smaller than the smallest supported page size so that we
don't
clobber over any guard pages, which may result in a segfault before
__stack_chk_fail can be called.

Also, move __stack_chk_fail outside of our namespace.
2023-12-19 11:59:42 -08:00

21 lines
825 B
C++

//===-- Internal header for __stack_chk_fail --------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SRC_COMPILER___STACK_CHK_FAIL_H
#define LLVM_LIBC_SRC_COMPILER___STACK_CHK_FAIL_H
// The compiler will emit calls implicitly to a non-namespaced version.
// TODO: can we additionally provide a namespaced alias so that tests can
// explicitly call the namespaced variant rather than the non-namespaced
// definition?
extern "C" {
[[noreturn]] void __stack_chk_fail();
} // extern "C"
#endif // LLVM_LIBC_SRC_COMPILER___STACK_CHK_FAIL_H