Skip to content

$) and $( should be IOKp but not IOK #18955

@FGasper

Description

@FGasper
> perl -MDevel::Peek -e'Dump( my $v = $) )'
SV = PVMG(0x7fe9b782e380) at 0x7fe9b7806ad0
  REFCNT = 1
  FLAGS = (IOK,POK,IsCOW,pIOK,pPOK)
  IV = 20
  NV = 0
  PV = 0x7fe9b6505760 "20 20 505 504 12 61 79 80 81 98 33 100 204 250 395 398 399"\0
  CUR = 58
  LEN = 64
  COW_REFCNT = 1

The fact that this is marked IOK tells XS modules (e.g., Sereal) that the IV value is legitimate. That’s sort of true, but it’s inconsistent with Perl’s typical behaviour of invalidating IOK whenever the IV mismatches the PV, which is the case here.

Note that leaving the private flag (IOKp) in place will prevent not-a-number warnings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions