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 mixing an enum value into a type object in Rakudo #2526

Closed
p6rt opened this issue Oct 21, 2011 · 5 comments
Closed

Segfault when mixing an enum value into a type object in Rakudo #2526

p6rt opened this issue Oct 21, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Oct 21, 2011

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

Searchable as RT101900$

@p6rt
Copy link
Author

p6rt commented Oct 21, 2011

From @masak

<jnthn> nom​: enum Foo < a b >; class A { }; say A but Foo​::a
<p6eval> nom e1a62b​: OUTPUT«(signal SEGV)»
<jnthn> shit.
<jnthn> nom​: enum Foo < a b >; class A { }; say A.new but Foo​::a
<p6eval> nom e1a62b​: OUTPUT«A+{<anon>}.new()␤»
<jnthn> nom​: enum Foo < a b >; class A { }; say (A.new but Foo​::a).Foo
<p6eval> nom e1a62b​: OUTPUT«Foo​::a␤»
<jnthn> grr, musta forgot the "no, you can't mix in to a type object"
detection somewhere
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Oct 23, 2011

From @jnthn

On Fri Oct 21 05​:22​:14 2011, masak wrote​:

<jnthn> nom​: enum Foo < a b >; class A { }; say A but Foo​::a
<p6eval> nom e1a62b​: OUTPUT«(signal SEGV)»
<jnthn> shit.
<jnthn> nom​: enum Foo < a b >; class A { }; say A.new but Foo​::a
<p6eval> nom e1a62b​: OUTPUT«A+{<anon>}.new()␤»
<jnthn> nom​: enum Foo < a b >; class A { }; say (A.new but Foo​::a).Foo
<p6eval> nom e1a62b​: OUTPUT«Foo​::a␤»
<jnthn> grr, musta forgot the "no, you can't mix in to a type object"
detection somewhere
* masak submits rakudobug

While we can catch it in Rakudo and maybe give a nicer error, the
underlying segfault is now fixed​:

enum Foo < a b >; class A { }; say A but Foo​::a
Cannot change the type of a type object

Test needed to make sure it dies (and not segfaults).

/jnthn

@p6rt
Copy link
Author

p6rt commented Oct 23, 2011

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

@p6rt
Copy link
Author

p6rt commented Oct 21, 2013

From @coke

On Sun Oct 23 10​:07​:07 2011, jnthn@​jnthn.net wrote​:

On Fri Oct 21 05​:22​:14 2011, masak wrote​:

<jnthn> nom​: enum Foo < a b >; class A { }; say A but Foo​::a
<p6eval> nom e1a62b​: OUTPUT«(signal SEGV)»
<jnthn> shit.
<jnthn> nom​: enum Foo < a b >; class A { }; say A.new but Foo​::a
<p6eval> nom e1a62b​: OUTPUT«A+{<anon>}.new()␤»
<jnthn> nom​: enum Foo < a b >; class A { }; say (A.new but Foo​::a).Foo
<p6eval> nom e1a62b​: OUTPUT«Foo​::a␤»
<jnthn> grr, musta forgot the "no, you can't mix in to a type object"
detection somewhere
* masak submits rakudobug

While we can catch it in Rakudo and maybe give a nicer error, the
underlying segfault is now fixed​:

enum Foo < a b >; class A { }; say A but Foo​::a
Cannot change the type of a type object

Test needed to make sure it dies (and not segfaults).

/jnthn

Test added in S12-enums/thorough.t

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 21, 2013

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

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