New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
my ($scalar) = grep $early-hit, $big-range hangs and segfaults instead of finishing quickly in Rakudo #1864
Comments
From @masak<masak> rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive' [...] <masak> it even segfaulted :( Found this example in A04, which promised it would be lazy. If the lack of laziness is fixed, it'll likely be difficult to |
From @pmichaudNow fixed in 9993ee9. Assigning ticket to moritz++ for spectest coverage. Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzOn Sun Jun 27 20:04:21 2010, pmichaud wrote:
Test coverage revealed that you only fixed the exact case mentioned in ./perl6 -e 'my ($x) = grep 5, 1..1_000_000; say $x' So giving ticket back to pmichaud++ for more general fix this time :-) Cheers, |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/assign.t commit 237f1992528d15f84b02d0f3bafdc4489096e5d5 [t/spec] test for RT #75950, my ($x) = grep $early_hit, @long_range Inline Patchdiff --git a/t/spec/S03-operators/assign.t b/t/spec/S03-operators/assign.t
index 829b37a..cbd6850 100644
--- a/t/spec/S03-operators/assign.t
+++ b/t/spec/S03-operators/assign.t
@@ -6,7 +6,7 @@ use Test;
# V
# L<S03/Changes to Perl 5 operators/list assignment operator now parses on the right>
-plan 240;
+plan 242;
# tests various assignment styles
@@ -757,4 +757,13 @@ sub l () { 1, 2 };
is((try {my $t = (1 == 0) ?? "true" !! "false"; $t}), "false", '.. also for false');
}
+# RT #75950
+#?rakudo skip 'RT 75950'
+{
+ my $x;
+ lives_ok { ($x) = grep 5, 1..1_000_000 },
+ 'Can grep lazily through a very long range';
+ is $x, 5, '... with correct result';
+}
+
# vim: ft=perl6 |
From @moritzworks now, corrected test passes. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#75950 (status was 'resolved')
Searchable as RT75950$
The text was updated successfully, but these errors were encountered: