[tor-commits] [tor/maint-0.4.1] Give a compile warning when we don't have any flags for minherit().

dgoulet at torproject.org dgoulet at torproject.org
Tue Jun 11 15:39:17 UTC 2019


commit cad0de35bd49064f5712f32a2b6e41ffe6e822e6
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed May 29 09:22:18 2019 -0400

    Give a compile warning when we don't have any flags for minherit().
    
    Part of ticket 30686.
---
 src/lib/malloc/map_anon.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib/malloc/map_anon.c b/src/lib/malloc/map_anon.c
index f4fda00bf..6afea713d 100644
--- a/src/lib/malloc/map_anon.c
+++ b/src/lib/malloc/map_anon.c
@@ -70,6 +70,11 @@
 
 #endif
 
+#if defined(HAVE_MINHERIT) && !defined(FLAG_ZERO) && !defined(FLAG_NOINHERIT)
+#warn "minherit() is defined, but we couldn't find the right flag for it."
+#warn "This is probably a bug in Tor's support for this platform."
+#endif
+
 /**
  * Helper: try to prevent the <b>sz</b> bytes at <b>mem</b> from being swapped
  * to disk.  Return 0 on success or if the facility is not available on this





More information about the tor-commits mailing list