This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix blead on non-threaded builds
authorDavid Mitchell <davem@iabyn.com>
Tue, 12 Mar 2019 07:10:10 +0000 (07:10 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 12 Mar 2019 07:10:10 +0000 (07:10 +0000)
My recent v5.29.8-64-g02a9632ac4 commit broke unthreaded builds.
This is the obvious fix. I've heard a report that unthreaded perl
SEGVs now but can't reproduce.

op.c

diff --git a/op.c b/op.c
index 4e49eee..b4ba9c8 100644 (file)
--- a/op.c
+++ b/op.c
@@ -14716,8 +14716,8 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
                                                             pass);
                         }
 
-#ifdef USE_ITHREADS
                         if (pass) {
+#ifdef USE_ITHREADS
                             /* Relocate sv to the pad for thread safety */
                             op_relocate_sv(&cSVOPo->op_sv, &o->op_targ);
                             arg->pad_offset = o->op_targ;