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

Date.new doesn't want to stringify and causes a segfault in Rakudo #2710

Closed
p6rt opened this issue Apr 10, 2012 · 4 comments
Closed

Date.new doesn't want to stringify and causes a segfault in Rakudo #2710

p6rt opened this issue Apr 10, 2012 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 10, 2012

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

Searchable as RT112376$

@p6rt
Copy link
Author

p6rt commented Apr 10, 2012

From @masak

<felher> Hey folks​: I have a segfault on my machine when doing 'echo
-e "~Date.new\n" | nom' with latest nom. Is that known? (the same
happens if i type it directly into the repl, fwiw)
<[Coke]> nom​: ~Date.new
<p6eval> rakudo 3bd91f​: OUTPUT«Cannot unbox a type object as a native int [...]
* moritz doesn't get a segfault either
* felher gets a segfault in the nom repl if he types "~Date.new\n^D"
<felher> strange :)
<gfldex> no segfault here on cygwin
<jnthn> Can one of you that segfautls possibly gdb/bt it?
<moritz> oh right, I get one at REPL exit too
<jnthn> REPL...exit?!
<moritz> aye
<moritz> in nqp_op_info_table
<moritz> jnthn​: https://gist.github.com/2351524
<[Coke]> some non sixian return value?
<moritz> I wonder if Date.new() should the same as Date.today()
<moritz> or if it should die with "Which date do you want?"

*bikeshedding*

<moritz> always the next Christmas :-)
<brrt> +1 for next christmas
<flussence> next christmas, unless the VM's version is >= 6.0, in
which case return last christmas :)
<masak> "Last Christmas, I gave you Perl 6..."
<jnthn> "...and the very next day, you segfaulted it..."
<[Coke]> mmhehehe.
<fsergot> :D
<[Coke]> nice little Wham! reference.
<masak> confirm segfault on Rakudo HEAD with 'Date.new' on REPL
followed by Ctrl+D.
* masak submits rakudobug
<moritz> masak​: HEAD
1
<moritz> masak​: b8fdbeaa avoids the segfault, but it's no real fix
<masak> moritz​: ok, that goes in the ticket as well.
<masak> moritz​: do you know a way to cause the segfault after that
commit went in?
<moritz> masak​: no :/
<moritz> except by reverting it
<masak> moritz​: any guess at the underlying cause?
<moritz> "programming error"
<masak> I'd be thankful if someone could extract Date from src/core of
HEAD~1, reproduce the error, and golf it down to something minimal.
<masak> my bet is it involves native attributes somehow.
<masak> this is your chance to catch a segfault!

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

From @FROGGS

fixed​:
<FROGGS> r​: say ~Date.new
<p6eval> rakudo bf472b​: OUTPUT«2012-12-24␤»

test​:
https://github.com/perl6/roast/blob/master/S32-temporal/Date.t#L35

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

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

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

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

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

No branches or pull requests

1 participant