develooper Front page | perl.perl5.porters | Postings from September 2014

[perl #121983] PERL_DEBUG_READONLY_OPS is incompat with regcomp

Father Chrysostomos via RT
September 20, 2014 14:49
[perl #121983] PERL_DEBUG_READONLY_OPS is incompat with regcomp
Message ID:
On Thu May 29 10:08:00 2014, wrote:
> This is a bug report for perl from,
> 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:

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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About