Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
I should try to compile before comiting. Sorry.
[simgrid.git] / src / xbt / memory_map.cpp
index 9babc54..101e369 100644 (file)
@@ -123,13 +123,13 @@ XBT_PRIVATE std::vector<VmMap> 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 if (lfields[1][3] == 's')
+    } else {
       memreg.flags |= MAP_SHARED;
-    else {
-      //fprintf(stderr,"%s", line);
-      xbt_die("Flag was neither 'p' (private) nor 's' (shared). This should have never happened! Instead, the permissions column was set to: %s", lfields[1]);
+      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 */