regcomp.c: Consolidate checks for warnings fatality
authorKarl Williamson <khw@cpan.org>
Mon, 15 Oct 2018 03:12:15 +0000 (21:12 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 20 Oct 2018 06:09:56 +0000 (00:09 -0600)
commit086f21bf411a8a8d04e22601720eff476ce2ef42
tree73c77b2caa85cf88dfdcf074e57ee317abb01aa0
parent77ccba3c5715a85c77db8f56837ed4b0a4682e5d
regcomp.c: Consolidate checks for warnings fatality

This adds code so that whenever a warning is about to be emitted, it
first checks to see if the warning is fatal, and if so mortalizes the SV
that otherwise would leak.

This partially fixes ticket [perl #133589].  It doesn't help if the
warnings are called through a subroutine outside of regcomp.c
regcomp.c