Lucet: set min-reserved-size to the same value as max-heap-size

If <min-reserved-size> is less than <max-heap-size>, the code will
still assume that only <min-reserved-size> bytes are accessible and
will trap even if the runtime could allocate more..

So, `max` should always be <= `min`. Naming options is hard.
This commit is contained in:
Frank Denis
2019-04-23 14:57:07 +02:00
parent e7942ad150
commit cec56d867f
+1 -1
View File
@@ -13,7 +13,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "lucet" ]; then
lucetc-wasi \
--min-reserved-size "${MAX_MEMORY_MB}MiB" \
-o "${1}.so" --opt-level best "$1" &&
lucet-wasi --dir=.:. "${1}.so" &&
lucet-wasi --dir=.:. --max-heap-size "${MAX_MEMORY_MB}MiB" "${1}.so" &&
rm -f "${1}.so" && exit 0
fi
fi