1 #include "unity.h" 2 3 #if CONFIG_COMPILER_STACK_CHECK 4 recur_and_smash_cxx(void)5static void recur_and_smash_cxx(void) 6 { 7 static int cnt; 8 volatile uint8_t buf[50]; 9 volatile int num = sizeof(buf)+10; 10 11 if (cnt++ < 1) { 12 recur_and_smash_cxx(); 13 } 14 for (int i = 0; i < num; i++) { 15 buf[i] = 0; 16 } 17 } 18 19 20 TEST_CASE("stack smashing protection CXX", "[stack_check] [ignore]") 21 { 22 recur_and_smash_cxx(); 23 } 24 25 #endif 26