Skip to content
Snippets Groups Projects
Commit c1e0eb7a authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

unix/main: Don't allow to specify too small heap size.

This will lead to crash like:

FATAL: uncaught NLR 80a5420

On x86_32, the minimum heap size is smaller, but not 2 times, so just
use value which works for x86_64.
parent 09866754
No related branches found
No related tags found
No related merge requests found
......@@ -375,6 +375,10 @@ STATIC void pre_process_options(int argc, char **argv) {
if (word_adjust) {
heap_size = heap_size * BYTES_PER_WORD / 4;
}
// If requested size too small, we'll crash anyway
if (heap_size < 700) {
goto invalid_arg;
}
#endif
} else {
invalid_arg:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment