The macOS Sandbox File Limit
There seems to be all kinds of limits in macOS that break things in weird ways they shouldn't. For example, calling the read() or write() syscalls with a count parameter of greater than 2^31-1 will fail with EINVAL, rather than doing something sane like a partial write. (This is not excused by the sentence in POSIX "If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined", as SSIZE_MAX is 2^63-1, not 2^31-1.) See <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/17414" rel="nofollow">https://gitlab.haskell.org/ghc/ghc/-/issues/17414</a> for details.