Package: libcache-mmap-perl / 0.11-4
Metadata
Package | Version | Patches format |
---|---|---|
libcache-mmap-perl | 0.11-4 | 3.0 (quilt) |
Patch series
view the series filePatch | File delta | Description |
---|---|---|
0001 Avoid Copy On Write problems with Perl 5.20.patch | (download) |
Mmap.pm |
2 1 1 - 0 ! |
[patch] avoid copy-on-write problems with perl 5.20 Quoting Dave Mitchell in https://rt.cpan.org/Public/Bug/Display.html?id=98630 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 rt.perl.org 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 Mmap.pm to call mmap() with an undef value rather than assigning "" to it first. Bug: https://rt.cpan.org/Public/Bug/Display.html?id=98630 Bug-Debian: https://bugs.debian.org/750226 |
1