Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Devel::Peek; $Devel::Peek::pv_limit = 3; use warnings; printf "$^V\n"; my $s = 's' x 32; Dump $s; my $addr = pack 'p', $s; printf "Q: hex: %x, dec: %1\$d\n", unpack 'Q', $addr; Dump $s; __END__ v5.32.1 SV = PV(0x1fbf48) at 0x24f0e08 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x2565cb8 "sss"...\0 CUR = 32 LEN = 34 Q: hex: 2565cb8, dec: 39214264 SV = PV(0x1fbf48) at 0x24f0e08 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x2565cb8 "sss"...\0 CUR = 32 LEN = 34 v5.42.0 SV = PV(0x1330f20f4c0) at 0x1330f2836a0 REFCNT = 1 FLAGS = (POK,IsCOW,pPOK) PV = 0x1330f3129f0 "sss"...\0 CUR = 32 LEN = 40 COW_REFCNT = 1 Q: hex: 1330f312400, dec: 1318809838592 SV = PV(0x1330f20f4c0) at 0x1330f2836a0 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x1330f312400 "sss"...\0 CUR = 32 LEN = 34
Previously (5.32), there was consistency as expected: PV address was "real" RAM address; and simple fact of "packing to pointer" didn't change scalar' guts. Now, I see some weird huge ("virtual"?) addresses -- even though everything works (including, not shown above, accessing (or acquiring, same values) these pointers from C). Where such numbers come from, is this the new normal? Is difference in "Dump" output related to that, or totally another issue?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Latest Strawberries: addresses reported by "p", Devel::Peek, etc.
by dave_the_m (Monsignor) on Oct 30, 2025 at 23:25 UTC | |
by Anonymous Monk on Oct 31, 2025 at 10:08 UTC | |
|
Re: Latest Strawberries: addresses reported by "p", Devel::Peek, etc.
by tonyc (Hermit) on Nov 02, 2025 at 22:14 UTC | |
by syphilis (Archbishop) on Nov 02, 2025 at 23:08 UTC | |
|
Re: Latest Strawberries: addresses reported by "p", Devel::Peek, etc.
by ysth (Canon) on Nov 05, 2025 at 01:51 UTC | |
by syphilis (Archbishop) on Nov 05, 2025 at 06:20 UTC |