Index: soft/giet_vm/xml/xml_parser.c
===================================================================
--- soft/giet_vm/xml/xml_parser.c	(revision 174)
+++ soft/giet_vm/xml/xml_parser.c	(revision 175)
@@ -364,9 +364,9 @@
 
     //////// get type attribute
-    str = getStringValue(reader, "type", &ok);
-#if XML_PARSER_DEBUG
-printf("        type = %s\n", str);
-#endif
-    if (ok && (strcmp(str, "ELF") == 0))
+    char *type_str = getStringValue(reader, "type", &ok);
+#if XML_PARSER_DEBUG
+printf("        type = %s\n", type_str);
+#endif
+    if (ok && (strcmp(type_str, "ELF") == 0))
     {
         vobj[vobj_index]->type = VOBJ_TYPE_ELF;
@@ -380,11 +380,11 @@
         }
     }
-    else if (ok && (strcmp(str, "BLOB")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_BLOB;
-    else if (ok && (strcmp(str, "PTAB")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_PTAB;
-    else if (ok && (strcmp(str, "PERI")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_PERI;
-    else if (ok && (strcmp(str, "MWMR")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_MWMR;
-    else if (ok && (strcmp(str, "LOCK")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_LOCK;
-    else if (ok && (strcmp(str, "BUFFER")  == 0)) vobj[vobj_index]->type = VOBJ_TYPE_BUFFER;
-    else if (ok && (strcmp(str, "BARRIER") == 0)) vobj[vobj_index]->type = VOBJ_TYPE_BARRIER;
+    else if (ok && (strcmp(type_str, "BLOB")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_BLOB;
+    else if (ok && (strcmp(type_str, "PTAB")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_PTAB;
+    else if (ok && (strcmp(type_str, "PERI")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_PERI;
+    else if (ok && (strcmp(type_str, "MWMR")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_MWMR;
+    else if (ok && (strcmp(type_str, "LOCK")    == 0)) vobj[vobj_index]->type = VOBJ_TYPE_LOCK;
+    else if (ok && (strcmp(type_str, "BUFFER")  == 0)) vobj[vobj_index]->type = VOBJ_TYPE_BUFFER;
+    else if (ok && (strcmp(type_str, "BARRIER") == 0)) vobj[vobj_index]->type = VOBJ_TYPE_BARRIER;
     else
     {
@@ -438,5 +438,5 @@
     }
     
-    ////////// get init attribute (optional : 0 if missing)
+    ////////// get init attribute (mandatory for mwmr and barrier)
     value = getIntValue(reader,"init", &ok);
     if ( ok )
@@ -449,5 +449,12 @@
     else
     {
-        vobj[vobj_index]->init = 0;
+        if(vobj[vobj_index]->type == VOBJ_TYPE_MWMR || vobj[vobj_index]->type == VOBJ_TYPE_BARRIER )
+        {
+            printf("[XML ERROR] illegal or missing <value> attribute for vobj (%d,%d), of type: %s\n", 
+                    vspace_index, vobj_loc_index, type_str);
+            exit(1);
+        }
+        else
+            vobj[vobj_index]->init = 0;
     }
 
