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
Crash (abort or segfault) when using 'but' in a loop #2943
Comments
From @japhbI see a segfault or backtrace crash after a few iterations of: perl6 -e 'for 1..100 -> $i { say $i; run "true"; 1; }' See https://gist.github.com/3925501 for example output. It crashes in perl6 -e 'for 1..100 -> $i { say $i; my $error = run "true"; 1; }' However, if the run() is the last statement in the loop block, it perl6 -e 'for 1..1000 -> $i { say $i; my $error = run "true"; }' -'f |
From @timoi was able to golf the "run" out of this: perl6 -e 'for 1..1000 -> $i { say $i; my $error = (my $val = perl6 -e 'for 1..1000 -> $i { say $i; my $error = (my $val = |
The RT System itself - Status changed from 'new' to 'open' |
From @usev6These error reports are difficult to assess from one or two years later. I'm inclined to say the bugs are fixed -- though there seems to exists another bug regarding the use of "but" in a for loop. But one at a time: $ perl6-m -e 'for 1..100 -> $i { say $i; run "true"; 1; }' $ perl6-m -e 'for 1..100 -> $i { say $i; my $error = run "true"; 1; }' All these commands from the original bug report run fine now. Should both tests be added to roast? (It doesn't make it faster ;-) $ perl6-m -e 'for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but !$val); 1 }' $ perl6-m -e 'for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but !$val) }' So, both commands from Timo Paulssens comment fail on Parrot (but run fine on Moar or JVM). Last year only the first command crashed. That makes me think that I'm seeing a different bug: The following command also crashes on Parrot -- for me around iteration 270). It runs fine on Moar and JVM: $ perl6-p -e 'for 1..500 { 0 but True }' There is also Ticket 116933 (https://rt-archive.perl.org/perl6/Ticket/Display.html?id=116933) which reports consistent crashes with "(0 but Bool::True)" in a for loop. (Though in that ticket the crashes happen earlier -- after about 6 to 13 iterations. So maybe even that's not the same thing. But on the other hand that was in 2013-02.) If the last crash could be fixed, maybe the commands from Timo Paulssens comment run fine now as well? |
From @usev6christian@cus:~/my_files/computer/Perl6/tmp/rakudo_work_9$ ./perl6-p -v |
From @usev6These error reports are difficult to assess from one or two years later. I'm inclined to say the bugs are fixed -- though there seems to exists another bug regarding the use of "but" in a for loop. But one at a time: $ perl6-m -e 'for 1..100 -> $i { say $i; run "true"; 1; }' $ perl6-m -e 'for 1..100 -> $i { say $i; my $error = run "true"; 1; }' All these commands from the original bug report run fine now. Should both tests be added to roast? (It doesn't make it faster ;-) $ perl6-m -e 'for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but !$val); 1 }' $ perl6-m -e 'for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but !$val) }' So, both commands from Timo Paulssens comment fail on Parrot (but run fine on Moar or JVM). Last year only the first command crashed. That makes me think that I'm seeing a different bug: The following command also crashes on Parrot -- for me around iteration 270). It runs fine on Moar and JVM: $ perl6-p -e 'for 1..500 { 0 but True }' There is also Ticket 116933 (https://rt-archive.perl.org/perl6/Ticket/Display.html?id=116933) which reports consistent crashes with "(0 but Bool::True)" in a for loop. (Though in that ticket the crashes happen earlier -- after about 6 to 13 iterations. So maybe even that's not the same thing. But on the other hand that was in 2013-02.) If the last crash could be fixed, maybe the commands from Timo Paulssens comment run fine now as well? |
From @usev6None of the above evaluations results in a crash/segfault. I tested with current Moar and JVM and Parrot from Rakudo Star 2015.02. I added three tests with commit Raku/roast@3957fed267 I'm closing this ticket as resolved. |
1 similar comment
From @usev6None of the above evaluations results in a crash/segfault. I tested with current Moar and JVM and Parrot from Rakudo Star 2015.02. I added three tests with commit Raku/roast@3957fed267 I'm closing this ticket as resolved. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#115390 (status was 'resolved')
Searchable as RT115390$
The text was updated successfully, but these errors were encountered: