https://bugzilla.redhat.com/show_bug.cgi?id=1855963

Petr Pisar <ppi...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED



--- Comment #3 from Petr Pisar <ppi...@redhat.com> ---
I managed to minimize it; main.pl:

#!/usr/bin/perl
BEGIN {
    require Safe;
    Safe->new;
}
tr/\x{100}//;

$ perl main.pl 
Undefined subroutine utf8::SWASHNEW called at main.pl line 6.

It happens when a tr/// with a 255-above code point is compiled after creating
a Safe object. (Bugzilla checksetup.pl has "new Safe" in
Bugzilla::Install::Util::_get_string_from_file() and tr/// in Bugzilla::Util.)

In my opinion it's an unintended effect of the Safe implementation. Safe should
affect only a code ($unsafe_code) compiled (reval()) inside a Safe object
($compartment) as read in the documentation:

      use Safe;
      $compartment = new Safe;
      $compartment->permit(qw(time sort :browse));
      $result = $compartment->reval($unsafe_code);


-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/perl-devel@lists.fedoraproject.org

Reply via email to