From e68a43f680415fdfa59dd28b090c1820d533c3dc Mon Sep 17 00:00:00 2001 From: Bowen Yu Date: Thu, 23 Feb 2017 21:07:12 -0500 Subject: [PATCH] change gnu stack limit flag --- test_runner | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test_runner b/test_runner index fabe63e..b9cbd17 100755 --- a/test_runner +++ b/test_runner @@ -30,8 +30,7 @@ if [[ $suffix == "cpp" ]]; then elif [[ $os == 'mac' ]]; then g++ -Wl,-stack_size,0x10000000 $2 -o $name -O2 -Wall -Wextra -std=gnu++0x || exit else - # stack size set by "ulimit -s" - g++ $2 -o $name -O2 -Wall -Wextra -std=gnu++0x || exit + g++ -fstack-limit-symbol=__stack_limit -Wl,--defsym,__stack_limit=0x10000000 -fstack-check $2 -o $name -O2 -Wall -Wextra -std=gnu++0x || exit fi runcmd="./$name" elif [[ $suffix == "java" ]]; then