From: Martin Quinson Date: Fri, 9 Sep 2016 22:58:26 +0000 (+0200) Subject: restore a warning when doing weird assumptions about the system X-Git-Tag: v3_14~411 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d2c309b44895ebb12bfd4033bdac809e2b5e67e2?hp=4cd03d236d21b16b2607d67b146cc44b402e7bdd restore a warning when doing weird assumptions about the system --- 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);