In perl.git, the branch smoke-me/tonyc/127743-cperl-storable-fixes has been updated
<https://perl5.git.perl.org/perl.git/commitdiff/9e081404a2589566d90c1c4eea0ad3e47a635165?hp=e4b11f15c4a65de8979fb0033ff2872517f0126a> - Log ----------------------------------------------------------------- commit 9e081404a2589566d90c1c4eea0ad3e47a635165 Author: Tony Cook <[email protected]> Date: Tue Jan 23 14:52:01 2018 +1100 (perl #127743) avoid searching very large limits If there was no default stack size limit this would end up running the system out of memory/swap. commit 81130eee3c75dd7d921bb31d888012dd17df2f55 Author: Tony Cook <[email protected]> Date: Mon Jan 22 14:31:21 2018 +1100 (perl #127743) re-incorporate the recursion limits for cygwin I missed including this when I translated the preprocessor macros in Storable.xs to perl, and cygwin64 was unhappy. Doing the same check that stacksize does works without these changes, but recurse.t failed (in the retrieve code). This exposes a limitation in these calculations - calls to Storable may occur from deeper in the call stack than the checks done by stacksize. The calculations ($stack_reserve) do try to fudge around that, but user code may end up doing that from even deeper within the call stack. ----------------------------------------------------------------------- Summary of changes: dist/Storable/stacksize | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize index 690645a4b4..b390419b6b 100644 --- a/dist/Storable/stacksize +++ b/dist/Storable/stacksize @@ -7,7 +7,8 @@ use Cwd; use strict; my $fn = "lib/Storable/Limit.pm"; -my ($bad1, $bad2) = (45000, 25000); +my $ptrsize = $Config{ptrsize}; +my ($bad1, $bad2) = (65001, 25000); sub QUIET () { (defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/ and !defined($ENV{TRAVIS})) @@ -163,7 +164,7 @@ my $max_depth_hash = $n; # the limits the use sees. my $stack_reserve = $^O eq "MSWin32" ? 32 : 16; -if ($] ge "5.016") { +if ($] ge "5.016" && !($^O eq "cygwin" && $ptrsize == 8)) { $max_depth -= $stack_reserve; $max_depth_hash -= $stack_reserve; } -- Perl5 Master Repository
