Skip to content

Commit

Permalink
Setup Task:tg earlier to enable emergency debugging earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Oct 14, 2023
1 parent 403f1c6 commit fbb9616
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2439,7 +2439,6 @@ Task* Task::clone(CloneReason reason, int flags, remote_ptr<void> stack,
bool ok = t->wait();
ASSERT(t, ok) << "Task " << t->tid << " killed unexpectedly; not sure how to handle this";

t->post_wait_clone(this, flags);
if (CLONE_SHARE_THREAD_GROUP & flags) {
ASSERT(this, !new_tg);
t->tg = tg;
Expand All @@ -2452,6 +2451,8 @@ Task* Task::clone(CloneReason reason, int flags, remote_ptr<void> stack,
}
t->tg->insert_task(t);

t->post_wait_clone(this, flags);

t->open_mem_fd_if_needed();
t->thread_areas_ = thread_areas_;
if (CLONE_SET_TLS & flags) {
Expand Down

0 comments on commit fbb9616

Please sign in to comment.