Debian Patches

Status for libcache-mmap-perl/0.11-4

Patch Description Author Forwarded Bugs Origin Last update
0001-Avoid-Copy-On-Write-problems-with-Perl-5.20.patch [PATCH] Avoid Copy-On-Write problems with Perl 5.20
Quoting Dave Mitchell in

After FC's commit, $buf gets marked as COW, since its a copy of a
COWable constant (the constant string "") and mmap() never unsets this
flag before stealing its buffer. So later on when it applies substr()
to $buf, the var is assumed to be COW and bad things happen to it.

The correct usage is still up for debate (see Leon's use case in tickets #116407 and #116925), but calling SvPV_force()
first would be a good first step (although that will cause the previous
contents of PVX() to leak). It might be better for to call mmap()
with an undef value rather than assigning "" to it first.
Niko Tyni <> yes debian upstream 2014-07-28

All known versions for source package 'libcache-mmap-perl'