mit-plv/fiat-crypto

`etc/ensure_stack_limit.sh` needs fixing

JasonGross opened this issue · 3 comments

Reminder to self

ulimit
/bin/sh: 10: [: 8192: unexpected operator
Warning: Stack size (8192) may be too small.
Warning: To avoid stack overflows in OCaml compilation, setting stack size to the recommended minimum of 32768 kbytes

I guess the issue here is that the Makefile needs to source ensure_stack_limit.sh and not just run it, so we need to be more POSIX compliant and not use anything specific to bash

Line 10 is

if [ "$stacksize" == "unlimited" ]; then exit 0; fi

Is this not available in sh?

According to https://stackoverflow.com/a/1089852/377022 we need = not ==. Or I can just test with !=