Skip to content

Commit

Permalink
Fixed bug that arises when enabling tracing in programs with enclaves.
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
Julian Robledo Mejia committed Mar 20, 2024
1 parent 3b25ffe commit 20be4b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,12 @@ void Scheduler::schedule_sync(BaseAction* action, const Tag& tag) {
log_.debug() << "Schedule action " << action->fqn() << (action->is_logical() ? " synchronously " : " asynchronously ")
<< " with tag " << tag;
reactor_assert(logical_time_ < tag);
tracepoint(reactor_cpp, schedule_action, action->container()->fqn(), action->name(), tag);
if(action->container()){
tracepoint(reactor_cpp, schedule_action, action->container()->fqn(), action->name(), tag);
}
else{
tracepoint(reactor_cpp, schedule_action, action->environment()->name(), action->name(), tag);
}
Statistics::increment_scheduled_actions();

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

0 comments on commit 20be4b1

Please sign in to comment.