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

segfault when class does role with 'our' variable in it in Rakudo #2847

Closed
p6rt opened this issue Aug 2, 2012 · 6 comments
Closed

segfault when class does role with 'our' variable in it in Rakudo #2847

p6rt opened this issue Aug 2, 2012 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Aug 2, 2012

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

Searchable as RT114380$

@p6rt
Copy link
Author

p6rt commented Aug 2, 2012

From @gfldex

... a undefined default value of a class that does a role.

role R {
  our $.r; # this is required
# my $.r; # this would trigger the bug too
}

class C does R {
  our $.c = LolImUndefined;
}

@p6rt
Copy link
Author

p6rt commented Aug 2, 2012

From @masak

On Thu Aug 02 08​:42​:40 2012, gfldex wrote​:

... a undefined default value of a class that does a role.

role R {
our $.r; # this is required
# my $.r; # this would trigger the bug too
}

class C does R {
our $.c = LolImUndefined;
}

Nice find.

We can even make this a bit shorter​:

<masak> nr​: role R { our $.r }; class C does R {}; say "alive"
<p6eval> rakudo d71ad1​: OUTPUT«(signal SEGV)»
<p6eval> ..niecza v19-15-g051783d​: OUTPUT«alive␤»
* masak adds this to https://rt-archive.perl.org/perl6/Ticket/Display.html?
id=114380

@p6rt
Copy link
Author

p6rt commented Aug 2, 2012

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

@p6rt
Copy link
Author

p6rt commented Aug 5, 2012

From @jnthn

On Thu Aug 02 14​:43​:08 2012, masak wrote​:

On Thu Aug 02 08​:42​:40 2012, gfldex wrote​:

... a undefined default value of a class that does a role.

role R {
our $.r; # this is required
# my $.r; # this would trigger the bug too
}

class C does R {
our $.c = LolImUndefined;
}

Nice find.

We can even make this a bit shorter​:

<masak> nr​: role R { our $.r }; class C does R {}; say "alive"
<p6eval> rakudo d71ad1​: OUTPUT«(signal SEGV)»
<p6eval> ..niecza v19-15-g051783d​: OUTPUT«alive␤»
* masak adds this to https://rt-archive.perl.org/perl6/Ticket/Display.html?
id=114380

Fixed; tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

From @moritz

Now tested in S14-roles/basic.t

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

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

@p6rt p6rt closed this as completed Aug 7, 2012
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant