develooper Front page | perl.perl5.porters | Postings from January 2017

[perl #130561] Coredump in Perl_re_op_compile

Thread Next
Hugo van der Sanden via RT
January 25, 2017 15:47
[perl #130561] Coredump in Perl_re_op_compile
Message ID:
On Sun, 22 Jan 2017 04:48:49 -0800, randir wrote:
> Before v5.18.0, this'd just die() during a regex compilation. It was
> either exposed or caused by the following commit:
> 31c15ce5372b770c3ca899df6cf102f1ed6866ba is the first bad commit
> commit 31c15ce5372b770c3ca899df6cf102f1ed6866ba
> Author: Karl Williamson <>
> Date:   Sat Sep 15 12:27:22 2012 -0600
> PATCH: [perl #82954] Make "Can't do {n,m} with n > m into warning
> This commit now causes this situation to warn instead of dying.  The
> portion of the regular expression that can't match is optimized into
> an

Yes, this change falls foul of:
    /* Do setup, note this code has side effects beyond
     * the rest of this block. Specifically setting
     * RExC_recurse[] must happen at least once during
     * study_chunk(). */
.. since it optimizes away the node we must still study.

Karl, do you see any problem with just removing the optimizing aspect, per the attached patch? If not, I'll wrap in a test and commit.


via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About