Skip Menu |
 
Report information
Id: 112376
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Date.new doesn't want to stringify and causes a segfault in Rakudo
Date: Tue, 10 Apr 2012 16:31:07 +0200
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Download (untitled) / with headers
text/plain 1.8k
<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!
Download (untitled) / with headers
text/plain 154b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org