This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #118551) an empty string from _freeze() now supplies the same to _thaw()/_attach()
The retrieve_hook() code would simply pass the string length to
NEWSV(), so if the length was zero, no PV would be allocated, and the
SV would not be upgraded.
The following code would then set POK on an SV that wasn't SVt_PV (or
better), resulting in fun later down the line.
Change to always supply at least 1 as the buffer size for NEWSV(), and
always set CUR and NUL terminate the buffer.