Skip Menu |

This queue is for tickets about the File-Map CPAN distribution.

Report information
The Basics
Id: 76253
Status: resolved
Priority: 0/
Queue: File-Map

People
Owner: Nobody in particular
Requestors: chm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.46
Fixed in: (no value)



Subject: sys_map missing fileno($fh)
Thanks so much for writing this module.  With it
I've finally been able to implement a cross-platform
memory-mapped IO for the Perl Data Language
(PDL)!

For compatibility with the original POSIX mmap
version, I used sys_map() rather than one of the
alternatives.  In the process I found that there
appears to be a missing fileno($fh) conversion
in sys_map() before the call to _mmap_impl().

With that fix, everything appears to work.  I would
appreciate if you could validate the fix and push
a new CPAN version as our PDL development
will need a working sys_map.  :-)

Thanks much!
Chris
Subject: sys_map_fd_fix.patch
diff -crB a/Map.pm b/Map.pm *** a/Map.pm Mon Apr 2 17:46:19 2012 --- b/Map.pm Mon Apr 2 17:46:45 2012 *************** *** 111,117 **** sub sys_map { ## no critic (ProhibitManyArgs) my (undef, $length, $protection, $flags, $fh, $offset) = @_; my $utf8 = _check_layers($fh); ! my $fd = ($flags & MAP_ANONYMOUS) ? $ANON_FH : $fh; $offset ||= 0; _mmap_impl($_[0], $length, $protection, $flags, $fd, $offset, $utf8); return; --- 111,117 ---- sub sys_map { ## no critic (ProhibitManyArgs) my (undef, $length, $protection, $flags, $fh, $offset) = @_; my $utf8 = _check_layers($fh); ! my $fd = ($flags & MAP_ANONYMOUS) ? $ANON_FH : fileno($fh); $offset ||= 0; _mmap_impl($_[0], $length, $protection, $flags, $fd, $offset, $utf8); return; Only in b: Map.pm~
On Mon Apr 02 17:54:18 2012, CHM wrote: Show quoted text
> Thanks so much for writing this module. With it > I've finally been able to implement a cross-platform > memory-mapped IO for the Perl Data Language > (PDL)! > > For compatibility with the original POSIX mmap > version, I used sys_map() rather than one of the > alternatives. In the process I found that there > appears to be a missing fileno($fh) conversion > in sys_map() before the call to _mmap_impl(). > > With that fix, everything appears to work. I would > appreciate if you could validate the fix and push > a new CPAN version as our PDL development > will need a working sys_map. :-)
Thank you for your bugreport. Oops, that's a regression! It's fixed in File::Map 0.47. Regards, Leon