SvTEMP_off to stop private PV's being stolen and stored in shared space
Nick Ing-Simmons [Wed, 23 Jan 2002 19:31:57 +0000 (19:31 +0000)]
p4raw-id: //depot/perlio@14392

ext/threads/shared/shared.xs

index 2d27951..9d9d6d8 100644 (file)
@@ -121,7 +121,7 @@ recursive_lock_acquire(pTHX_ recursive_lock_t *lock,char *file,int line)
                                CALLER_CONTEXT; \
                                LEAVE_LOCK;     \
                            } STMT_END
-                       
+
 
 /*
 
@@ -370,7 +370,7 @@ Perl_sharedsv_share(pTHX_ SV *sv)
     case SVt_PVCV:
        Perl_croak(aTHX_ "Cannot share subs yet");
        break;
-       
+
     default:
        ENTER_LOCK;
        Perl_sharedsv_associate(aTHX_ &sv, 0, 0);
@@ -425,6 +425,7 @@ sharedsv_scalar_store(pTHX_ SV *sv, shared_sv *shared)
        }
     }
     else {
+               SvTEMP_off(sv);
        SHARED_CONTEXT;
        sv_setsv_nomg(SHAREDSvPTR(shared), sv);
        CALLER_CONTEXT;