Bug 967463 - perl-5.18: SvTRUE returns wrong value
Summary: perl-5.18: SvTRUE returns wrong value
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL: https://rt.perl.org:443/rt3/Ticket/Di...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-27 08:34 UTC by Petr Pisar
Modified: 2013-08-14 08:28 UTC (History)
11 users (show)

Fixed In Version: perl-5.18.1-287.fc20
Clone Of:
Environment:
Last Closed: 2013-08-14 08:28:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2013-05-27 08:34:23 UTC
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>
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 11:43:29 UTC
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.