Skip to content

Commit f0f62ad

Browse files
julianrobledomJulian Robledo Mejia
and
Julian Robledo Mejia
authored
Fixed bug that arises when enabling tracing in programs with enclaves. (#55)
* Fixed bug that arises when enabling tracing in programs with enclaves. - Action tracing takes the action container as argument, but in a program with enclaves some of the actions might not have a container, which leads to segmentation fault. - The bug was fixed by giving the environment name as parameter instead of the container name, for the actions without a container. - Notice that the bug only arises if a tracing session was started with the ./tracing/start_tracing.sh script, before running the lf program. * Corrected format * fixed null ptr value --------- Co-authored-by: Julian Robledo Mejia <[email protected]>
1 parent 3b25ffe commit f0f62ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/scheduler.cc

+5-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,11 @@ void Scheduler::schedule_sync(BaseAction* action, const Tag& tag) {
461461
log_.debug() << "Schedule action " << action->fqn() << (action->is_logical() ? " synchronously " : " asynchronously ")
462462
<< " with tag " << tag;
463463
reactor_assert(logical_time_ < tag);
464-
tracepoint(reactor_cpp, schedule_action, action->container()->fqn(), action->name(), tag);
464+
if (action->container() != nullptr) {
465+
tracepoint(reactor_cpp, schedule_action, action->container()->fqn(), action->name(), tag);
466+
} else {
467+
tracepoint(reactor_cpp, schedule_action, action->environment()->name(), action->name(), tag);
468+
}
465469
Statistics::increment_scheduled_actions();
466470

467471
const auto& action_list = event_queue_.insert_event_at(tag);

0 commit comments

Comments
 (0)