Bug 1855963
| Summary: | Safe in Perl 5.30 does not preload utf8_heavy.pl preventing from running Bugzilla checksetup.pl script: Undefined subroutine utf8::SWASHNEW | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Sjoerd Mullender <sjoerd> |
| Component: | perl | Assignee: | Petr Pisar <ppisar> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 31 | CC: | caillon+fedoraproject, iarnell, jplesnik, kasal, mmaslano, perl-devel, ppisar, psabata, rhughes, sandmann, spotrh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | perl-5.30.3-455.fc32 perl-5.30.3-454.fc31 perl-5.30-3120200803114857.a9ea5770 perl-5.30-3220200803114857.35f641a4 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-07-16 01:14:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Sjoerd Mullender
2020-07-11 10:36:30 UTC
The Perl bug is still open and the fix was not merged into Perl sources. Bugzilla bug is closed. Can you please provide a minimal Perl reproducer that does not involve installing Bugzilla? I can't provide a reproducer. I haven't done any serious Perl programming since about 1988 and have no intention of starting now. A simple google search on utf8::SWASHNEW shows quite a few instances of this problem, but they all involve checksetup.pl in bugzilla. 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);
perl-libs-5.30.3-452.fc31 is affected. perl-libs-5.32.0-456.fc33 is not affected, because utf8_heavy.pl whose loading is prevented by Safe was removed in perl 5.31.6 and is not loaded anymore. That's probably the reason why Perl upstream has never fixed it. FEDORA-2020-59f945f4be has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-59f945f4be FEDORA-2020-54c4dc151a has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-54c4dc151a FEDORA-2020-59f945f4be has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-59f945f4be` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-59f945f4be See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-54c4dc151a has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-54c4dc151a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-54c4dc151a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-59f945f4be has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-54c4dc151a has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-MODULAR-2020-bfc9507514 has been submitted as an update to Fedora 32 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2020-bfc9507514 FEDORA-MODULAR-2020-b67d5de786 has been submitted as an update to Fedora 31 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2020-b67d5de786 FEDORA-MODULAR-2020-bfc9507514 has been pushed to the Fedora 32 Modular testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2020-bfc9507514 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-MODULAR-2020-b67d5de786 has been pushed to the Fedora 31 Modular testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2020-b67d5de786 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-MODULAR-2020-b67d5de786 has been pushed to the Fedora 31 Modular stable repository. If problem still persists, please make note of it in this bug report. FEDORA-MODULAR-2020-bfc9507514 has been pushed to the Fedora 32 Modular stable repository. If problem still persists, please make note of it in this bug report. |