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
......@@ -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;
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment