Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ignore local variables without type in snapshot.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 15 Feb 2022 12:48:17 +0000 (13:48 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 15 Feb 2022 12:53:02 +0000 (13:53 +0100)
Makes test 's4u-mc-bugged1-liveness' succeed when built with gcc.

Use '--log=mc_snapshot.thres:verbose' to activate the debug message.
AFAICS, the affected variable is parameter 'code' in simcall_blocking.

Note that I would have preferred to correct the DWARF loading code, but
I couldn't figure out what was missing.

src/mc/sosp/Snapshot.cpp

index 625cf52..cb495f0 100644 (file)
@@ -58,6 +58,12 @@ static void fill_local_variables_values(mc_stack_frame_t stack_frame, Frame* sco
     if (not valid_variable(&current_variable, scope, (void*)stack_frame->ip))
       continue;
 
+    if (not current_variable.type) {
+      XBT_VERB("Ignore local variable without type: '%s' [%s]", current_variable.name.c_str(),
+               stack_frame->frame->name.c_str());
+      continue;
+    }
+
     s_local_variable_t new_var;
     new_var.subprogram = stack_frame->frame;
     new_var.ip         = stack_frame->ip;