From c6afdc5dc7dad6757252ddc4e5a4f10ed5d688fa Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Tue, 5 Dec 2023 12:47:19 +0100 Subject: [PATCH] Upstreaming changes to the main repo (2) (#61) --- tests/CMakeLists.txt | 2 ++ tests/chkstk-test.c | 13 +++++++++++++ tests/chkstk-test.cpp | 10 ++++++++++ 3 files changed, 25 insertions(+) create mode 100755 tests/chkstk-test.c create mode 100755 tests/chkstk-test.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4dee7a466..1dcdab068 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -30,6 +30,8 @@ enable_testing() add_executable( aarch64-mingw-tests.exe bigdata-test.cpp + chkstk-test.c + chkstk-test.cpp iostream-test.cpp math-test.c math-test.cpp diff --git a/tests/chkstk-test.c b/tests/chkstk-test.c new file mode 100755 index 000000000..d1f74a96c --- /dev/null +++ b/tests/chkstk-test.c @@ -0,0 +1,13 @@ +/* + Tests stack probing +*/ + +void f1(char* data) +{ + *data = 0; +} + +void chkstk_test() { + char test[300000]; + f1(test); +} \ No newline at end of file diff --git a/tests/chkstk-test.cpp b/tests/chkstk-test.cpp new file mode 100755 index 000000000..28c6b7b09 --- /dev/null +++ b/tests/chkstk-test.cpp @@ -0,0 +1,10 @@ +#include + +extern "C" void chkstk_test(); + +TEST(Aarch64MinGW, CHKSTKTest) +{ + chkstk_test(); +} + +