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
Perl6: /examples/life.p6 is broken #13
Comments
From alexg@ebi.ac.ukHi, The example Perl6 'Game of Life' program --- ../../parrot_cvs/parrot/languages/perl6/examples/life.p6 Tue sub main() { However, now parrot crashes with a segfault somewhere in the Generate Error: '/tmp_mnt/nfs6/vol_vol1_homes/alexg/parrot_cvs/parrot/parrot -r I've had a look at the generated (and attached) imc file, and can't see This is using a fresh cvs checkout: (May 11 2004 15:54 GMT) running on -- Tel: 01223 492537 |
From alexg@ebi.ac.uk.sub __main find_lex $P306, "&print1" find_lex $P308, "&substr" find_lex $P334, "&print" find_lex $P410, "&print" L_160: find_lex $P423, "&Print" find_lex $P427, "&time" find_lex $P431, "&Generate" find_lex $P441, "&time" find_lex $P445, "&Print" find_lex $P449, "&print" L_178: find_lex $P4, "&substr" find_lex $P30, "&substr" find_lex $P56, "&substr" find_lex $P82, "&substr" find_lex $P108, "&substr" find_lex $P134, "&substr" find_lex $P160, "&substr" find_lex $P186, "&substr" find_lex $P212, "&substr" find_lex $P233, "&substr" find_lex $P251, "&substr" find_lex $P278, "&substr" .sub _substr non_prototyped .sub _length non_prototyped .sub _reverse non_prototyped .sub _join non_prototyped .sub _index non_prototyped .sub _time non_prototyped .sub _sleep non_prototyped .sub _print1 non_prototyped .sub _print non_prototyped .sub _exit non_prototyped .sub _die non_prototyped # setup $!: #################### # Look for a CATCH handler: ### # Remove top catch handler die_nohandler: .sub _warn non_prototyped .sub _grep non_prototyped .sub _map non_prototyped .sub __setup # @ARGS == @ARGV[1..@ARGV.length] # %ENV # exception handling: .sub _install_catch non_prototyped .sub _pop_catch non_prototyped |
From @allisonAlex Gutteridge wrote:
I've checked in your update to the concat operator.
(My apologies for being so verbose, I'm hoping to be educational as well One good rule is to create the simplest code that duplicates the sub Generate($input) { sub main() { This made a much shorter generated .imc file (much easier to scan), and
I fixed this in the "prefix_return" method in P6C::IMCC::prefix. This Linux is a bit trickier. It was still segfaulting after the fix. With a (The code loops 100 times. Each outer loop calls a subroutine that loops This is the smallest bit of code I could get to segfault in my linux sub main () { 15 calls to 'substr' in each loop segfaults (14 doesn't), and it always To confirm my suspicion, I ran gdb on the generated PIR code from the $ gdb parrot # and from the gdb prompt # and when it segfaulted #0 0x401571b7 in memcpy () from /lib/libc.so.6 So, this is where I hand it off to Leo. It may be a known bug in Parrot, Allison |
The RT System itself - Status changed from 'new' to 'open' |
From @leoAllison Randal <al@shadowed.net> wrote:
Fixed. The code in smallobject.c that allocates new buffer memory did assume
leo |
From nickg@glencros.demon.co.ukLooks very much like my bug 29246, and a very similar example. Nick Allison Randal wrote:
|
From @allisonLeo wrote:
Yup, that fixed it. Thanks! Allison |
stephane@modxml.org - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#29509 (status was 'resolved')
Searchable as RT29509$
The text was updated successfully, but these errors were encountered: