madvise: tolerate EINVAL and ENOSYS when minherit fails

These errors can occur if we are built on a system with support for
madvise(MADV_NOFORK) but then we are run on a system whose kernel
does not support that flag.

If the error is something that we don't tolerate at all, we now log
it before crashing.

Fixes bug 31696.  I am calling this a bugfix on 0.4.1.1-alpha, where
we actually started using the map_anon code.

This is similar to, but not the same as, the fix for #31570.
This commit is contained in:
Nick Mathewson
2019-09-11 09:13:50 -04:00
parent 4596ead2fc
commit 0891a31ad3
2 changed files with 26 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
o Major bugfixes (crash, Linux):
- Tolerate systems (including some Linux installations) where madvise
and/or MADV_DONTFORK are available at build-time, but not at run time.
Previously, these systems would notice a failed syscall and abort.
Fixes bug 31696; bugfix on 0.4.1.1-alpha.