File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,9 @@ if(NOT LLVM_LIBC_FULL_BUILD)
60
60
return ()
61
61
endif ()
62
62
63
- add_subdirectory (dirent )
64
63
add_subdirectory (assert )
64
+ add_subdirectory (compiler )
65
+ add_subdirectory (dirent )
65
66
add_subdirectory (network )
66
67
add_subdirectory (setjmp )
67
68
add_subdirectory (signal )
Original file line number Diff line number Diff line change
1
+ add_custom_target (libc_stack_chk_guard_unittests )
2
+
3
+ add_libc_unittest (
4
+ stack_chk_guard_test
5
+ SUITE
6
+ libc_stack_chk_guard_unittests
7
+ SRCS
8
+ stack_chk_guard_test.cpp
9
+ DEPENDS
10
+ libc.src.compiler.__stack_chk_fail
11
+ )
Original file line number Diff line number Diff line change
1
+ // ===-- Unittests for assert ----------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+
9
+ #include " llvm-libc-macros/signal-macros.h"
10
+ #include " src/compiler/__stack_chk_fail.h"
11
+ #include " test/UnitTest/Test.h"
12
+
13
+ TEST (LlvmLibcStackChkFail, Death) {
14
+ EXPECT_DEATH ([] { LIBC_NAMESPACE::__stack_chk_fail (); },
15
+ WITH_SIGNAL (SIGABRT));
16
+ }
You can’t perform that action at this time.
0 commit comments