Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : use abort() instead of a hack for core dump
[simgrid.git] / src / mc / mc_liveness.c
index c841a9663b4054f65bbb2983442647275e8e6ae0..6c353804681dd4850bcca4d2a4810353b858ddb3 100644 (file)
@@ -48,7 +48,7 @@ int create_dump(int pair)
   switch(fork()){
   case 0:
     // We are the child process -- run the actual program
-    *(int *)1 = 2;  // segfault
+    abort();
     break;
     
   case -1:
@@ -63,7 +63,7 @@ int create_dump(int pair)
     printf("child exited with status %d\n", status);
     if(WIFSIGNALED(status) && WCOREDUMP(status)){
       printf("got a core dump\n");
-      char *core_name = malloc(20);;
+      char *core_name = malloc(20);
       sprintf(core_name,"mv core core_%d", pair); 
       system((char *)core_name);
       free(core_name);