This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
skip trying to constant fold an incomplete op tree
authorTony Cook <tony@develop-help.com>
Tue, 8 Dec 2020 03:28:29 +0000 (14:28 +1100)
committerTony Cook <tony@develop-help.com>
Wed, 23 Dec 2020 02:42:48 +0000 (02:42 +0000)
commit08be3ef7f1190d94279ad0b3e13519ac8dc3b0ec
tree660ea763f14c02d6f5f2f728cdb29a5fe36d6582
parent150d2b0b3a4665f34c3168e835bf777bdda060da
skip trying to constant fold an incomplete op tree

This code would try to constant fold an op tree like

  relop
    +- null
    +- constant

which would underflow the stack, potentially crashing perl.

This is intended as a quick fix rather than as a complete
solution.

Fixes #18380
op.c
t/op/cmpchain.t