Skip to content

Commit

Permalink
account for thread_join deleting tc from threads
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Feb 18, 2018
1 parent 8c1f6bc commit 6b7532a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/profiler/instrument.c
Expand Up @@ -573,7 +573,9 @@ void MVM_profile_dump_instrumented_data(MVMThreadContext *tc) {

while (thread) {
MVMThreadContext *othertc = thread->body.tc;
if (othertc->prof_data) {
/* Check for othertc to exist because joining threads nulls out
* the tc entry in the thread object. */
if (othertc && othertc->prof_data && othertc != tc) {
/* If we have any call frames still on the profile stack, exit them. */
while (othertc->prof_data->current_call)
MVM_profile_log_exit(othertc);
Expand Down

0 comments on commit 6b7532a

Please sign in to comment.