summaryrefslogtreecommitdiff
path: root/dist/threads-shared/shared.xs
diff options
context:
space:
mode:
Diffstat (limited to 'dist/threads-shared/shared.xs')
-rw-r--r--dist/threads-shared/shared.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs
index 549fe374b8..6ead3bae43 100644
--- a/dist/threads-shared/shared.xs
+++ b/dist/threads-shared/shared.xs
@@ -1194,7 +1194,8 @@ Perl_sharedsv_init(pTHX)
/* This pair leaves us in shared context ... */
PL_sharedsv_space = perl_alloc();
perl_construct(PL_sharedsv_space);
- CALLER_CONTEXT;
+ LEAVE; /* This balances the ENTER at the end of perl_construct. */
+ PERL_SET_CONTEXT((aTHX = caller_perl));
recursive_lock_init(aTHX_ &PL_sharedsv_lock);
PL_lockhook = &Perl_sharedsv_locksv;
PL_sharehook = &Perl_sharedsv_share;