Skip to content

mmapForLinkerMarkExecutable call mprotect with len = 0

mmapForLinkerMarkExecutable can call mprotect on a region with a length of zero. I'm not sure what the correct behavior is in this case. The Linux documentation for the syscall makes no mention of this case, while OpenBSD's mprotect man page explicitly says that if len is zero no action is taken and it's not an error. At any rate, QEMU sets ENOMEM in this case, which breaks Haskell.nix's remote-iserv TH cross compilation trick, see https://github.com/input-output-hk/haskell.nix/issues/1227

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information