develooper Front page | perl.perl6.compiler | Postings from May 2012

[perl #113394] Returning from an exhausted routine causes segmentation fault

From:
Moritz Lenz
Date:
May 27, 2012 00:51
Subject:
[perl #113394] Returning from an exhausted routine causes segmentation fault
Message ID:
rt-3.6.HEAD-7788-1338105091-1431.113394-82-0@perl.org
# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #113394]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113394 >


09:47 < moritz> p6: sub f { gather loop { take 1; return } }; say f
09:47 <+p6eval> rakudo e75663: OUTPUT«(signal SEGV)»

I expected an error along the lines of "Cannot return from exhausted
routine" (because by the time the return() is run, the function already
has returned a lazy list.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About