diff options
| author | Kamil Rytarowski <krytarowski@users.noreply.github.com> | 2019-01-14 09:52:03 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-14 09:52:03 +0100 |
| commit | 95485883f6451cd21e4f7643c32fad0b66bb134d (patch) | |
| tree | 25ffcdb10c2bf35bd4e65ca6b26cbbcfea14f9ea /executor | |
| parent | 7ffdc167882f34183c52287fa326eed0281e2814 (diff) | |
executor: do not call setrlimit(2) for RLIMIT_AS for NetBSD
Setting the limit caused abnormal failure during early init on NetBSD.
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_bsd.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h index 0dcf6ff5f..652f3c660 100644 --- a/executor/common_bsd.h +++ b/executor/common_bsd.h @@ -280,9 +280,11 @@ static void sandbox_common() // Some minimal sandboxing. struct rlimit rlim; -#ifndef GOOS_openbsd +#ifdef GOOS_freebsd // Documented bug in OpenBSD. - // This causes frequent random aborts on netbsd. Reason unknown. + // This causes frequent random aborts. Reason unknown. + + // This also causes ENOMEM on NetBSD during early init. rlim.rlim_cur = rlim.rlim_max = 128 << 20; setrlimit(RLIMIT_AS, &rlim); #endif |
