Skip to content
Monpediaby Unity Nodes
OpenPull Request

[vm] Bind the spec VM's symbols at load in the fuzzer

by khordadiCreated Dec 4, 2026category-labs/monad

Two nightly VM fuzz runs died with a segfault (compiler seed 1632882308704150268, interpreter seed 5357327594315309529). Both reproduce on main in about a second, and both pass with this change.

The crash is in the spec VM, not ours. Its OCaml code calls through lazily bound PLT entries. The first call through one runs the dynamic linker's resolver on OCaml's 32 KB fiber stack, with no stack check. A gdb watchpoint caught the resolver overwriting the stack's header deep in nested calls. OCaml then raises Stack_overflow, and the runtime crashes while reporting it.

LD_BIND_NOW=1 resolves every symbol at load. Startup time is unchanged.

Linking libmonadml_evm.so with -z now would fix this at the source. That belongs in the spec repo, and monad's pin can't move to spec main yet, since spec main drops MONAD_EIGHT.

馃 Generated with Claude Code