Bug 967463 - perl-5.18: SvTRUE returns wrong value
perl-5.18: SvTRUE returns wrong value
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jitka Plesnikova
Fedora Extras Quality Assurance
https://rt.perl.org:443/rt3/Ticket/Di...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-27 04:34 EDT by Petr Pisar
Modified: 2013-08-14 04:28 EDT (History)
11 users (show)

See Also:
Fixed In Version: perl-5.18.1-287.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 04:28:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2013-05-27 04:34:23 EDT
There is a regression in SvTRUE macro. Expected value is:

$ perl -MScalar::Util=dualvar -le 'print $]; $a = dualvar 1, ""; print $a ? "true" : "false";'
5.016003
false

This is broken in 5.18.0 and fixed with upstream commit:

commit 762dbf22cb22645771fc27b5d197fd40cbbd9da8
Author: Father Chrysostomos <sprout@cpan.org>
Date:   Sat May 25 23:59:45 2013 -0700

    [perl #118159] Make PVs take precedence in SvTRUE
    
    Commit 4bac9ae4 (probably inadvertently) changed SvTRUE to treat an SV
    with any of PVX, IVX or NVX having a true value as true.
    
    Traditionally, truth was based solely on stringification. The examina-
    tion of the SvIVX and SvNVX slots was for those cases where there was
    no string already and it could be deduced from IVX or NVX whether it
    would stringify as "0" or no (bugs with -0 aside).
    
    This changes things back to the way they have ‘always’ been.
Comment 1 Fedora Admin XMLRPC Client 2013-08-12 07:43:29 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Note You need to log in before you can comment on or make changes to this bug.