Skip to content

Commit

Permalink
Threadsafe List.reify-until-lazy a bit
Browse files Browse the repository at this point in the history
This is a bandaid for the 2017.10 release.  It fixes the most common
place where #1202 goes awry.
The result is fewer crashes, and if they crash, it's because MoarVM
itself go thoroughly corrupted.
  • Loading branch information
lizmat committed Oct 23, 2017
1 parent e70969e commit 50324bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/List.pm
Expand Up @@ -111,7 +111,7 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
($!future.DEFINITE && nqp::not_i($!current-iter.DEFINITE)),
nqp::stmts(
nqp::while(
nqp::elems($!future),
$!future.DEFINITE && nqp::elems($!future),
nqp::if(
(nqp::istype((my $current := nqp::shift($!future)),Slip)
&& nqp::isconcrete($current)),
Expand All @@ -129,8 +129,8 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
$!reification-target.push($current)
)
),
nqp::unless(
nqp::elems($!future),
nqp::if(
$!future.DEFINITE && nqp::not_i(nqp::elems($!future)),
$!future := Mu
)
)
Expand Down

0 comments on commit 50324bb

Please sign in to comment.