You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 21, 2024. It is now read-only.
Currently, both of these are defined in runtime/caml/config.h, with Minor_heap_max defined as 2GB and Max_domains as 128. This makes Multicore OCaml programs use at the minimum 256GB of virtual address space. This causes problems for tools like AFL and Valgrind, which cannot seem to deal with mmap reserve and expects to commit that much memory, and hence run out of memory on Multicore OCaml.
My proposal is to make both Minor_heap_max and Max_domains as OCAMLRUNPARAM options (whose default values can remain the same as now). With that change, we will be able to use AFL and Valgrind without having to have a separate compiler switch where these macros are defined to have much smaller values.
AFL would use Max_domains as 1, and Minor_heap_max to a small default such as 2 MB (non-determinism with multiple domains will affect AFL stability). Similarly, for valgrind, one you use a smaller Minor_heap_max. I have confirmed that both AFL and valgrind work with Max_domains as 1 and Minor_heap_max as 2 MB.
Currently, both of these are defined in
runtime/caml/config.h, withMinor_heap_maxdefined as 2GB andMax_domainsas 128. This makes Multicore OCaml programs use at the minimum 256GB of virtual address space. This causes problems for tools like AFL and Valgrind, which cannot seem to deal with mmap reserve and expects to commit that much memory, and hence run out of memory on Multicore OCaml.My proposal is to make both
Minor_heap_maxandMax_domainsas OCAMLRUNPARAM options (whose default values can remain the same as now). With that change, we will be able to use AFL and Valgrind without having to have a separate compiler switch where these macros are defined to have much smaller values.AFL would use
Max_domainsas 1, andMinor_heap_maxto a small default such as 2 MB (non-determinism with multiple domains will affect AFL stability). Similarly, for valgrind, one you use a smallerMinor_heap_max. I have confirmed that both AFL and valgrind work withMax_domainsas 1 andMinor_heap_maxas 2 MB.