Skip to content

Commit e68a43f

Browse files
committed
change gnu stack limit flag
1 parent d8c3688 commit e68a43f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test_runner

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ if [[ $suffix == "cpp" ]]; then
3030
elif [[ $os == 'mac' ]]; then
3131
g++ -Wl,-stack_size,0x10000000 $2 -o $name -O2 -Wall -Wextra -std=gnu++0x || exit
3232
else
33-
# stack size set by "ulimit -s"
34-
g++ $2 -o $name -O2 -Wall -Wextra -std=gnu++0x || exit
33+
g++ -fstack-limit-symbol=__stack_limit -Wl,--defsym,__stack_limit=0x10000000 -fstack-check $2 -o $name -O2 -Wall -Wextra -std=gnu++0x || exit
3534
fi
3635
runcmd="./$name"
3736
elif [[ $suffix == "java" ]]; then

0 commit comments

Comments
 (0)