This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #127743) fix two problems with large object ids
Storable assigns an object id to every scalar it freezes, including to
unused elements in arrays.
There were two problems here:
a) in retrieve(), object ids over 2**31-1 but less than 2**32 were
treated as signed, so the wrong object was produced in the resulting
data structure. Two changes we made to fix this:
i) retrieve() now treats object ids in the problem range as
unsigned, so data written by older Storables is now treated
correctly.
ii) store() now writes object ids in the problem range as 64-bit
ids, so that older Storables will fail rather than producing an
incorrect result data structure.
b) once over 2**32 scalars had been output, the code still produced
32-bit object ids when referring to previous scalars. Fixed by
adding support for 64-bit object ids.
There's still an issue with object ids in hook produced data.
Testing these changes requires ridiculous amounts of memory - ~32GB
for a) and ~66GB for b), and the tests take a long time to run, hence
for those tests to run you need the following in the environment;
PERL_TEST_MEMORY >= 70
PERL_RUN_SLOW_TESTS != 0