This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123759] always count on OPpTRANS_IDENTICAL
authorHugo van der Sanden <hv@crypt.org>
Sun, 8 Feb 2015 13:53:00 +0000 (13:53 +0000)
committerHugo van der Sanden <hv@crypt.org>
Mon, 9 Feb 2015 12:03:03 +0000 (12:03 +0000)
commita53bfdae91fb2d719e69761f2d2f84c5d8a47753
tree4e758edfc701e2cd2d1090c730c44dd49a756af1
parent7aa8cb0dec173dcfca4157e60634c74b97429a05
[perl #123759] always count on OPpTRANS_IDENTICAL

If we detect that an in-place transliteration will not result in any
changes to the string, we set OPpTRANS_IDENTICAL and skip the normal
checks for readonlyness; but if we do that, we must make sure to use
the same logic to decide which transliteration strategy to use, or
we may end up trying to write to the readonly string anyway.

This resulted in several ways to hit assert failures, found by AFL
(<http://lcamtuf.coredump.cx/afl>).
doop.c
t/op/tr.t