From: Artur Bergman Date: Thu, 11 Jul 2002 13:02:15 +0000 (+0000) Subject: Don't set the context to the running thread before X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=648212304d8f6fe6e0c0e38d33ed5499d3001652;p=p5sagit%2Fp5-mst-13.2.git Don't set the context to the running thread before we run destroy on the old, cures segfault on linux. p4raw-id: //depot/perl@17481 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 4173299..8260e04 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -131,7 +131,6 @@ Perl_ithread_destruct (pTHX_ ithread* thread, const char *why) destroyperl = thread->interp; thread->interp = NULL; } - PERL_SET_CONTEXT(aTHX); MUTEX_UNLOCK(&thread->mutex); MUTEX_DESTROY(&thread->mutex); PerlMemShared_free(thread); @@ -139,6 +138,7 @@ Perl_ithread_destruct (pTHX_ ithread* thread, const char *why) perl_destruct(destroyperl); perl_free(destroyperl); } + PERL_SET_CONTEXT(aTHX); } int