From d2c309b44895ebb12bfd4033bdac809e2b5e67e2 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 10 Sep 2016 00:58:26 +0200 Subject: [PATCH 1/1] restore a warning when doing weird assumptions about the system --- src/xbt/memory_map.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xbt/memory_map.cpp b/src/xbt/memory_map.cpp index 379a22e5ef..35dba46d67 100644 --- a/src/xbt/memory_map.cpp +++ b/src/xbt/memory_map.cpp @@ -123,10 +123,14 @@ XBT_PRIVATE std::vector get_memory_map(pid_t pid) if (memreg.prot == 0) memreg.prot |= PROT_NONE; - if (lfields[1][3] == 'p') + if (lfields[1][3] == 'p') { memreg.flags |= MAP_PRIVATE; - else + } else { memreg.flags |= MAP_SHARED; + if (lfields[1][3] != 's') + XBT_WARN("The protection is neither 'p' (private) nor 's' (shared) but '%s'. Let's assume shared, as on b0rken win-ubuntu systems.\nFull line: %s\n" + lfields[1], line); + } /* Get the offset value */ memreg.offset = std::strtoull(lfields[2], &endptr, 16); -- 2.20.1