perl5
perl5 copied to clipboard
pp_pack: SvPV_force() pack(p/P, ...) arguments when writable
pack("p"/"P") is generally pretty awful, but we document that you can pack("P") and then write to the pointer supplied, so make that safer by ensuring the PV isn't shared with other SVs.
Since _force() throws on a READONLY SV, and you shouldn't be writing to one, only _force() for a writable SV.
This is still broken when magic is involved, but we did document it as usable.
Fixes the UUID::FFI part of #22380
Some other modules (and UUID::FFI itself, really) will need XS fixes.