Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: user42_kevin [...] yahoo.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.63



Subject: protect() error message
Date: Tue, 19 Aug 2014 21:07:16 +1000
To: bug-File-Map [...] rt.cpan.org
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
With recent debian i386 perl 5.20.0 if protect() is called with an invalid protection mode argument then it prints garbage characters in its croak message. For example foo.pl below prints No such mode '\240\370^A' known at /home/gg/bug/file-map-errmsg/foo.pl line 8. where those \240 etc are actual high bytes. I expected it to print something like No such mode 'bogusmode' I suspect in S_protection_value() that croak() takes a string rather than an SV.
use strict; use File::Map 'map_file','protect'; print File::Map->VERSION,"\n"; map_file (my $str, '/etc/passwd'); print "mapped ok\n"; protect ($str, 'bogusmode'); print "protect ok\n";
On Tue Aug 19 07:12:05 2014, user42_kevin@yahoo.com.au wrote: Show quoted text
> With recent debian i386 perl 5.20.0 if protect() is called with an > invalid protection mode argument then it prints garbage characters in > its croak message. For example foo.pl below prints > > No such mode '\240\370^A' known at /home/gg/bug/file-map-errmsg/foo.pl > line 8. > > where those \240 etc are actual high bytes. I expected it to print > something like > > No such mode 'bogusmode' > > I suspect in S_protection_value() that croak() takes a string rather > than an SV.
Thanks for the report. This was fixed in 0.63, but I forgot to close the ticket earlier. Leon