Now also reported as
https://rt.perl.org/Public/Bug/Display.html?id=130921
With my bleadperl v5.25.5-100-g2b5e7bc2e6 the SEGV is like this:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 Perl_save_pushptr (my_perl=my_perl@entry=0x55a43454a110, ptr=ptr@entry=0x55a43533c280,
type=type@entry=10) at scope.c:571
571 SS_ADD_PTR(ptr);
(gdb) bt
#0 Perl_save_pushptr (my_perl=my_perl@entry=0x55a43454a110, ptr=ptr@entry=0x55a43533c280,
type=type@entry=10) at scope.c:571
#1 0x000055a432a22683 in Perl_utf8n_to_uvchr (my_perl=0x55a43454a110, s=0x7ffcb0cb1108 "",
s@entry=0x7ffcb0cb1107 "\300", curlen=1, retlen=retlen@entry=0x7ffcb0cb10b0,
flags=flags@entry=16384) at utf8.c:1054
#2 0x00007f555fd0deb4 in rpl_Perl_mbrtowc (my_perl=<optimized out>, pwc=0x7ffcb0cb10f8,
s=0x7ffcb0cb1107 "\300", n=<optimized out>, ps=<optimized out>) at regex_internal.h:1355
#3 0x00007f555fd0e150 in rpl_Perl_mbtowc (my_perl=<optimized out>, pwc=<optimized out>,
s=<optimized out>, n=<optimized out>) at regex_internal.h:1393
#4 0x00007f555fd0e1aa in rpl_Perl_btowc (my_perl=<optimized out>, c=<optimized out>)
at regex_internal.h:1414
#5 0x00007f555fd18cfe in init_dfa (is_utf8=<optimized out>, pat_len=<optimized out>,
dfa=0x55a43532ae40, my_perl=0x55a43454a110) at regcomp.c:937
#6 re_compile_internal (my_perl=my_perl@entry=0x55a43454a110, preg=preg@entry=0x55a43532add8,
pattern=pattern@entry=0x55a43532ae20 "\\([^x]\\)\\(x\\)", length=<optimized out>,
syntax=<optimized out>, is_utf8=<optimized out>) at regcomp.c:781
#7 0x00007f555fd19652 in GNU_dupe (my_perl=0x55a43454a110, rx=0x55a43531b7f0, param=<optimized out>)
at GNU.xs:1021
#8 0x000055a432965770 in Perl_re_dup_guts (my_perl=my_perl@entry=0x55a43454a110,
sstr=sstr@entry=0x55a434ec19b8, dstr=dstr@entry=0x55a43531b7f0, param=param@entry=0x7ffcb0cb1450)
at regcomp.c:19611
#9 0x000055a4329be891 in S_sv_dup_common (my_perl=my_perl@entry=0x55a43454a110,
sstr=0x55a434ec19b8, param=param@entry=0x7ffcb0cb1450) at sv.c:13815
#10 0x000055a4329bf228 in Perl_sv_dup_inc (param=0x7ffcb0cb1450, sstr=<optimized out>,
my_perl=0x55a43454a110) at sv.c:14049
#11 S_sv_dup_inc_multiple (my_perl=my_perl@entry=0x55a43454a110, source=0x55a434d3c5c0,
source@entry=0x55a434d3be30, dest=0x55a4352f5170, dest@entry=0x55a4352f49e0, items=0,
items@entry=242, param=param@entry=0x7ffcb0cb1450) at sv.c:13618
#12 0x000055a4329bf08d in S_sv_dup_common (my_perl=my_perl@entry=0x55a43454a110,
sstr=0x55a434522b68, param=param@entry=0x7ffcb0cb1450) at sv.c:13884
#13 0x000055a4329c9419 in Perl_sv_dup_inc (param=0x7ffcb0cb1450, sstr=<optimized out>,
my_perl=0x55a43454a110) at sv.c:14049
#14 perl_clone (proto_perl=proto_perl@entry=0x55a434520010, flags=flags@entry=2) at sv.c:15058
#15 0x00007f556118872e in S_ithread_create (num_params=1, params_start=8, exit_opt=0,
gimme=<optimized out>, stack_size=0, init_function=0x55a434541018, my_pool=0x55a4345d51d0,
parent_perl=0x55a434520010) at threads.xs:829
#16 XS_threads_create (my_perl=0x55a434520010, cv=<optimized out>) at threads.xs:1148
#17 0x000055a4329ad380 in Perl_pp_entersub (my_perl=0x55a434520010) at pp_hot.c:3983
#18 0x000055a4329a56b6 in Perl_runops_standard (my_perl=0x55a434520010) at run.c:41
#19 0x000055a43292bba9 in S_run_body (oldscope=1, my_perl=0x55a434520010) at perl.c:2526
#20 perl_run (my_perl=0x55a434520010) at perl.c:2449
#21 0x000055a43290443d in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>)
at perlmain.c:123