On Thu May 29 10:08:00 2014, rurban@cpanel.net wrote: > > This is a bug report for perl from rurban@cpanel.net, > generated with the help of perlbug 1.40 running under perl 5.21.0. > > > ----------------------------------------------------------------- > ./Configure -des -Accflags=-DPERL_DEBUG_READONLY_OPS > make miniperl > ./miniperl -Ilib -e1 > => > Program received signal SIGSEGV, Segmentation fault. > 0x0000000000623168 in Perl_pp_regcomp () at pp_ctl.c:167 > 167 PM_SETRE(pm, new_re); > > when pm->op_pmregexp needs to be written to but is in write protected > op slab. > > A regcomp LOGOP should not be Slab_to_ro allocated. > > Detected by hugmeir. simple testcase ./miniperl -e '"" =~ /$x/' > such as: http://paste.scsys.co.uk/386789 The purpose of PERL_DEBUG_READONLY_OPS is to make sure threaded perls don’t modify ops at run time, since they are shared between threads. For non-threaded perls, making sure ops are not modified is going to make everything crash, because ops are intentionally (and safely) modified frequently. So PERL_DEBUG_READONLY_OPS does not make sense without threads. I’ve made the error more obvious in commit 40653c2. -- Father Chrysostomos --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=121983