develooper Front page | perl.perl5.porters | Postings from August 2016

[perl #70652] Malformed UTF-8 character in bitwise xor when using $1

Thread Next
From:
Dan Collins via RT
Date:
August 17, 2016 15:12
Subject:
[perl #70652] Malformed UTF-8 character in bitwise xor when using $1
Message ID:
rt-4.0.24-21195-1471446728-86.70652-15-0@perl.org
I am able to partially reproduce this on 5.8.8, even less partially reproduce it on 5.10 and 5.12, and it appears to have been "fixed" in 5.14. My 5.8.8 differs from the reporter's in that $1 never stops being UTF8. In 5.10.0, the bitwise warning disappears, and nothing is UTF8 after that line. In 5.14.0, $1 stops being UTF8 as well

    1) UTF-8 flag of $1 after m//
    2) UTF-8 flag of $1 after utf8::is_utf8($iv)
    3) Warning after bitwise ^
    4) UTF-8 flag of $1 after ^
    5) UTF-8 flag of $x after ^
    6) UTF-8 flag of $iv after ^

    +----------------------+---+---+---+---+---+---+
    | TEST                 | 1 | 2 | 3 | 4 | 5 | 6 |
    +----------------------+---+---+---+---+---+---+
    | 5.8.8 (Expected?)    | 0 | 0 | 0 | 0 | 0 | 0 |
    | 5.8.8 (Reporter)     | 1 | 0 | 1 | 0 | 1 | 1 |
    | 5.8.8 (Mine)         | 1 | 1 | 1 | 0 | 1 | 1 |
    | 5.10.0 (Mine)        | 1 | 1 | 0 | 0 | 0 | 0 |
    | 5.12.0 (Mine)        | 1 | 1 | 0 | 0 | 0 | 0 |
    | 5.14.0 (Mine)        | 0 | 0 | 0 | 0 | 0 | 0 |
    | ...no changes...     |   |   |   |   |   |   |
    | 5.25.2 (Mine)        | 0 | 0 | 0 | 0 | 0 | 0 |
    +----------------------+---+---+---+---+---+---+

I'm choosing not to bisect this because there are at least two steps to this fix, and perl versions before 5.12ish don't build on my computer without manual assistance. It does appear that all the issues raised by this ticket have been resolved in every currently maintained perl.

-- 
Respectfully,
Dan Collins

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=70652

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About