This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Turn off OK flags when creating a regexp.
authorFather Chrysostomos <sprout@cpan.org>
Mon, 29 Oct 2012 06:56:01 +0000 (23:56 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 30 Oct 2012 19:36:04 +0000 (12:36 -0700)
commit62f099ef204889a21560e343bf620c0f18ca5249
treedf4ad41d0b093238b21873368d55a3f9e134dba9
parenta896ab67104cb26016f7f3f97991d6e0720034d0
Turn off OK flags when creating a regexp.

$ perl5.16.0 -le '$x = 1.1; $x = ${qr//}; print 0+$x'
4.15336878055219e-317
$ perl5.16.0 -le '$x = 1; $x = ${qr//}; print 0+$x'
1645024

Very strange.

Under debugging builds, both produce assertion failures.

By turning off all OK flags, we also prevent the destination’s utf8-
ness from sticking.
regcomp.c
t/op/qr.t