Skip to content
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

segmentation fault on the 'say 1..{$_}' #1254

Closed
p6rt opened this issue Aug 26, 2009 · 9 comments
Closed

segmentation fault on the 'say 1..{$_}' #1254

p6rt opened this issue Aug 26, 2009 · 9 comments
Labels
LHF Low-hanging fruit, easy to resolve

Comments

@p6rt
Copy link

p6rt commented Aug 26, 2009

Migrated from rt.perl.org#68788 (status was 'resolved')

Searchable as RT68788$

@p6rt
Copy link
Author

p6rt commented Aug 26, 2009

From @ilyabelikin

Hi there,
this code produce segmentation fault on the Rakudo bd51ce26​:

say 1..{$_}

Thank you!
Ihrd

@p6rt
Copy link
Author

p6rt commented Aug 29, 2009

From frioux@gmail.com

What did you expect this to produce? Generally speaking I would have
tried to do 1..$_, but maybe you are doing something different.

@p6rt
Copy link
Author

p6rt commented Aug 29, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 30, 2009

From @ilyabelikin

Hi,
actually, I expected some sort of error, but no segaful

2009/8/30 fREW Schmidt via RT <perl6-bugs-followup@​perl.org>​:

What did you expect this to produce?  Generally speaking I would have
tried to do 1..$_, but maybe you are doing something different.

@p6rt
Copy link
Author

p6rt commented Jun 6, 2010

From @ShimmerFairy

<lue> rakudo​: say 1..{$_} # checking a ticket
<p6eval> rakudo a3de52​: ( no output )

Well, now it just hangs. At least it's not a segfault :)
--
Don't Panic!

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

From @bbkr

On Kiev build​:

$ perl6 -e '(1..{$_}).WHAT.say'
Range()

Taken for tests

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

From @bbkr

Tests added in S03-operators/range.t

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

@bbkr - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 30, 2010
@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/range.t

commit e86dbd27f17ba176d80d25819e9d77e4cbca8995
Author​: bbkr <bbkr@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Wed Jun 30 12​:57​:06 2010 +0000

  [t/spec] tests for RT #​68788 segmentation fault on the "say 1..{$_}"
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31512 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S03-operators/range.t b/t/spec/S03-operators/range.t
index 8a36cd6..96e17db 100644
--- a/t/spec/S03-operators/range.t
+++ b/t/spec/S03-operators/range.t
@@ -2,7 +2,7 @@ use v6;
 
 use Test;
 
-plan 114;
+plan 116;
 
 
 # L<S03/Nonchaining binary precedence/Range object constructor>
@@ -213,5 +213,11 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c',   'Ranges and infix:<Z>';
     ok !defined(try { 0 .. (0, 1, 2) }), '0 .. List is illegal';
 }
 
+# RT #68788
+{
+    $_ = Any; # unsetting $_ to reproduce bug literally
+    lives_ok {(1..$_)}, '(1..$_) lives';
+    isa_ok (1..$_), Range, '(..) works on Int .. Any';
+}
 
 # # vim: ft=perl6

@p6rt p6rt added the LHF Low-hanging fruit, easy to resolve label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LHF Low-hanging fruit, easy to resolve
Projects
None yet
Development

No branches or pull requests

1 participant