develooper Front page | perl.perl5.porters | Postings from February 2018

[perl #132870] Storable dclone() broken (latest VS 2017 32-bit)

Thread Previous
From:
Tony Cook via RT
Date:
February 19, 2018 02:32
Subject:
[perl #132870] Storable dclone() broken (latest VS 2017 32-bit)
Message ID:
rt-4.0.24-10049-1519007552-141.132870-15-0@perl.org
On Thu, 15 Feb 2018 05:11:22 -0800, jacques.germishuys@gmail.com wrote:
> $VAR1 = {
>   'value' => 1
> };
> SV = IV(0x166b3b4) at 0x166b3b8
>   REFCNT = 1
>   FLAGS = (ROK)
>   RV = 0x164d6f8
>   SV = PVHV(0x1653810) at 0x164d6f8
>     REFCNT = 1
>     FLAGS = (OOK,SHAREKEYS)
>     AUX_FLAGS = 0
>     ARRAY = 0x172e390  (0:7, 1:1)
>     hash quality = 100.0%
>     KEYS = 1
>     FILL = 1
>     MAX = 7
>     RITER = -1
>     EITER = 0x0
>     RAND = 0x7ebeb2c7
>     Elt "value" HASH = 0x9dce435e
>     SV = IV(0x164d7d4) at 0x164d7d8
>       REFCNT = 1
>       FLAGS = (IOK,pIOK)
>       IV = 1
> $VAR1 = {
>   'value' => -255
> };
> SV = IV(0x1661bfc) at 0x1661c00
>   REFCNT = 1
>   FLAGS = (ROK)
>   RV = 0x164d808
>   SV = PVHV(0x1653dd0) at 0x164d808
>     REFCNT = 1
>     FLAGS = (OOK,SHAREKEYS)
>     AUX_FLAGS = 0
>     ARRAY = 0x172e250  (0:7, 1:1)
>     hash quality = 100.0%
>     KEYS = 1
>     FILL = 1
>     MAX = 7
>     RITER = -1
>     EITER = 0x0
>     RAND = 0x5820a183
>     Elt "value" HASH = 0x9dce435e
>     SV = IV(0x166114c) at 0x1661150
>       REFCNT = 1
>       FLAGS = (IOK,pIOK)
>       IV = -255
> 
> 
> The value of 1 got changed to -255. I've also seen 0 change to -256!

Reproduced in blead:

J:\dev\perl\git\perl>.\perl -Ilib -MStorable=dclone -MData::Dumper -le "$x = { a => 1 }; print Dumper(dclone($x))"
$VAR1 = {
          'a' => -255
        };


J:\dev\perl\git\perl>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25835 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Tony

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

Thread Previous


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