On Fri Dec 04 03:39:40 2020, eyadof@gmail.com wrote:
Show quoted text> a segmentation fault will be caused by code like this:
>
> use strict;
> use warnings;
>
> use experimental qw(signatures);
>
> use Future::AsyncAwait;
>
> async sub test ($value)
> my $s = 's' {
> print $value;
> }
>
> test(1);
At first glance it appears actually to crash inside XS::Parse::Sublike:
$ gdb --args perl -Mblib rt133865.pl
...
(gdb) run
Starting program: /usr/bin/perl -Mblib rt133865.pl
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7fb2c8c in ?? ()
from /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/XS/Parse/Sublike/Sublike.so
(gdb) bt
#0 0x00007ffff7fb2c8c in ?? ()
from /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/XS/Parse/Sublike/Sublike.so
#1 0x00005555555ef035 in yyl_keylookup (my_perl=my_perl@entry=0x5555558dd2a0,
s=0x55555594c465 "y $s = 's' {\n", s@entry=0x55555594c460 " my $s = 's' {\n",
gv=<optimized out>) at toke.c:8556
#2 0x00005555555efc1b in yyl_try (my_perl=0x5555558dd2a0, s=<optimized out>)
at toke.c:9128
#3 0x00005555555f3a84 in Perl_yylex (my_perl=0x5555558dd2a0) at toke.c:9438
#4 0x00005555555f67a4 in Perl_yyparse (my_perl=my_perl@entry=0x5555558dd2a0,
gramtype=gramtype@entry=258) at perly.c:340
#5 0x00005555555c8117 in S_parse_body (xsinit=0x55555559c580 <xs_init>, env=0x0,
my_perl=<optimized out>) at perl.c:2576
#6 perl_parse (my_perl=<optimized out>, xsinit=xsinit@entry=0x55555559c580 <xs_init>,
argc=<optimized out>, argv=<optimized out>, env=env@entry=0x0) at perl.c:1871
#7 0x000055555559c3c3 in main (argc=<optimized out>, argv=<optimized out>,
env=<optimized out>) at perlmain.c:126
--
Paul Evans