Skip Menu |
Report information
Id: 131258
Status: rejected
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: jeroen.vanwolffelaar [at] booking.com
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: medium
Type:
Perl Version: 5.18.2
Fixed In: (no value)



From: Jeroen van Wolffelaar <jeroen.vanwolffelaar [...] booking.com>
To: perlbug [...] perl.org
Date: Fri, 5 May 2017 18:45:40 +0200
Subject: IO::Uncompress::Gunzip silently does not process utf8 strings
Download (untitled) / with headers
text/plain 2.4k

This is a bug report for perl from jeroen.vanwolffelaar@booking.com,
generated with the help of perlbug 1.39 running under perl 5.18.2.


-----------------------------------------------------------------
Calling

my $text = "This is the raw text";
gzip \$text, \my $gz or die;
my $utf8gz = $gz;
utf8::upgrade($utf8gz);

gunzip \$utf8gz => $filename|\$uncompressed_data;

succeeds (returns 1), while stuffing the input data into file
$filename/variable $uncompressed_data, not decompressing anything.

It should either decompress the string (even though it's wasteful/silly that it
is utf8, and it's unclear whether it should treat the utf8-bytes OR the encoded
string-as-latin1 as the data), or return an error.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
    module=IO::Uncompress::Gunzip
---
Site configuration information for perl 5.18.2:

Configured by root at Mon Feb 20 16:49:45 CET 2017.

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=, archname=x86_64-linux
    uname='linux gnulinux '
    config_args=''
  Compiler:
    cc='gcc', ccflags ='',
    optimize='-O2',
    cppflags=''
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =''
    libpth=/usr/lib64
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.18.2:
    lib


---
Environment for perl 5.18.2:
    HOME=/home/jvanwolffela
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/jvanwolffela/perl5/bin
    PERL5LIB=lib
    PERL_BADLANG (unset)
    PERL_LOCAL_LIB_ROOT=/home/jvanwolffela/perl5:/home/jvanwolffela/perl5
    PERL_MB_OPT=--install_base "/home/jvanwolffela/perl5"
    PERL_MM_OPT=INSTALL_BASE=/home/jvanwolffela/perl5
    SHELL=/bin/bash

--Jeroen
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Fri, 05 May 2017 17:01:45 GMT, jeroen.vanwolffelaar@booking.com wrote: Show quoted text
> This is a bug report for perl from jeroen.vanwolffelaar@booking.com, > generated with the help of perlbug 1.39 running under perl 5.18.2. > > > ----------------------------------------------------------------- > Calling > > my $text = "This is the raw text"; > gzip \$text, \my $gz or die; > my $utf8gz = $gz; > utf8::upgrade($utf8gz); > > gunzip \$utf8gz => $filename|\$uncompressed_data; > > succeeds (returns 1), while stuffing the input data into file > $filename/variable $uncompressed_data, not decompressing anything. > > It should either decompress the string (even though it's wasteful/silly > that it > is utf8, and it's unclear whether it should treat the utf8-bytes OR the > encoded > string-as-latin1 as the data), or return an error. >
IO::Uncompress::Gunzip is part of the IO-Compress library, which is maintained upstream on CPAN. Please file this report by sending mail to: bug-IO-Compress@rt.cpan.org or by creating a ticket at: https://rt.cpan.org//Dist/Display.html?Queue=IO-Compress Thank you very much. -- James E Keenan (jkeenan@cpan.org)
From: Jeroen van Wolffelaar via perl5-porters <perl5-porters [...] perl.org>
To: perlbug-followup [...] perl.org
Subject: Re: [External] [perl #131258] IO::Uncompress::Gunzip silently does not process utf8 strings
Date: Sat, 6 May 2017 19:05:58 +0200
Download (untitled) / with headers
text/plain 1.5k
Thanks for the pointer, I filed https://rt.cpan.org/Ticket/Display.html?id=121545 .

(maybe an idea if perlbug would've redirected me? It asked me about which module this was, so theoretically it should be able to figure out/even correctly route the ticket?)

--Jeroen

On Sat, May 6, 2017 at 2:34 PM, James E Keenan via RT <perlbug-followup@perl.org> wrote:
Show quoted text
On Fri, 05 May 2017 17:01:45 GMT, jeroen.vanwolffelaar@booking.com wrote:
> This is a bug report for perl from jeroen.vanwolffelaar@booking.com,
> generated with the help of perlbug 1.39 running under perl 5.18.2.
>
>
> -----------------------------------------------------------------
> Calling
>
> my $text = "This is the raw text";
> gzip \$text, \my $gz or die;
> my $utf8gz = $gz;
> utf8::upgrade($utf8gz);
>
> gunzip \$utf8gz => $filename|\$uncompressed_data;
>
> succeeds (returns 1), while stuffing the input data into file
> $filename/variable $uncompressed_data, not decompressing anything.
>
> It should either decompress the string (even though it's wasteful/silly
> that it
> is utf8, and it's unclear whether it should treat the utf8-bytes OR the
> encoded
> string-as-latin1 as the data), or return an error.
>


IO::Uncompress::Gunzip is part of the IO-Compress library, which is maintained upstream on CPAN.  Please file this report by sending mail to:

bug-IO-Compress@rt.cpan.org

or by creating a ticket at:

https://rt.cpan.org//Dist/Display.html?Queue=IO-Compress

Thank you very much.

--
James E Keenan (jkeenan@cpan.org)


To: Jeroen van Wolffelaar <jeroen.vanwolffelaar [...] booking.com>
From: Dave Mitchell <davem [...] iabyn.com>
CC: perlbug-followup [...] perl.org
Subject: Re: [External] [perl #131258] IO::Uncompress::Gunzip silently does not process utf8 strings
Date: Mon, 8 May 2017 08:48:27 +0100
Download (untitled) / with headers
text/plain 1.5k
On Sat, May 06, 2017 at 07:05:58PM +0200, Jeroen van Wolffelaar via perl5-porters wrote: Show quoted text
> (maybe an idea if perlbug would've redirected me? It asked me about which > module this was, so theoretically it should be able to figure out/even > correctly route the ticket?)
Perlbug is supposed to do this. However, the code currently only does: if the module is not bundled with perl: suggest a mis-spelling or try http://rt.cpan.org, else if module has a bug tracker entry: suggest using that bug tracker instead However, Module::CoreList's pod entry for it's bug_tracker() method implies that bug_tracker() is only to override the default of http://rt.cpan.org/Public/Dist/Display.html?Name=$ModuleName So perlbug won't correctly handle modules bundled with perl that have a default bugtracker. I think the actual logic should be: if the module is not bundled with perl: suggest a mis-spelling or try http://rt.cpan.org; else if Module::CoreList::upstream($module) $tracker = Module::CoreList::bug_tracker($module) // "http://rt.cpan.org/Public/Dist/Display.html?Name=$module" suggest using $tracker instead else accept bug report -- "But Sidley Park is already a picture, and a most amiable picture too. The slopes are green and gentle. The trees are companionably grouped at intervals that show them to advantage. The rill is a serpentine ribbon unwound from the lake peaceably contained by meadows on which the right amount of sheep are tastefully arranged." -- Lady Croom, "Arcadia"
To: Dave Mitchell <davem [...] iabyn.com>
From: Jeroen van Wolffelaar via perl5-porters <perl5-porters [...] perl.org>
CC: perlbug-followup [...] perl.org
Subject: Re: [External] [perl #131258] IO::Uncompress::Gunzip silently does not process utf8 strings
Date: Mon, 8 May 2017 10:24:52 +0200
Dave, I'm extremely unfamiliar with the perl RT setup (as you noticed), can you -- if needed -- create an issue in the right place for perlbug?

I don't think having it somewhere downstream of some unrelated IO::Compress issue is the right place.

Thanks, and yeah, it makes sense to adjust this in the way you describe.

--Jeroen

On Mon, May 8, 2017 at 9:48 AM, Dave Mitchell <davem@iabyn.com> wrote:
Show quoted text
On Sat, May 06, 2017 at 07:05:58PM +0200, Jeroen van Wolffelaar via perl5-porters wrote:
> (maybe an idea if perlbug would've redirected me? It asked me about which
> module this was, so theoretically it should be able to figure out/even
> correctly route the ticket?)

Perlbug is supposed to do this. However, the code currently only does:

    if the module is not bundled with perl:
        suggest a mis-spelling or try http://rt.cpan.org,
    else if module has a bug tracker entry:
        suggest using that bug tracker instead

However, Module::CoreList's pod entry for it's bug_tracker() method
implies that bug_tracker() is only to override the default of
    http://rt.cpan.org/Public/Dist/Display.html?Name=$ModuleName

So perlbug won't correctly handle modules bundled with perl that have a
default bugtracker.

I think the actual logic should be:

    if the module is not bundled with perl:
        suggest a mis-spelling or try http://rt.cpan.org;
    else if Module::CoreList::upstream($module)
        $tracker = Module::CoreList::bug_tracker($module)
            // "http://rt.cpan.org/Public/Dist/Display.html?Name=$module"
        suggest using $tracker instead
    else
        accept bug report



--
"But Sidley Park is already a picture, and a most amiable picture too.
The slopes are green and gentle. The trees are companionably grouped at
intervals that show them to advantage. The rill is a serpentine ribbon
unwound from the lake peaceably contained by meadows on which the right
amount of sheep are tastefully arranged." -- Lady Croom, "Arcadia"


RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 118b
This ticket can be closed. I'm tracking it upstream in https://rt.cpan.org/Ticket/Display.html?id=121545 cheers Paul
CC: perlbug-followup [...] perl.org
Subject: Re: [External] [perl #131258] IO::Uncompress::Gunzip silently does not process utf8 strings
From: Dave Mitchell <davem [...] iabyn.com>
To: Jeroen van Wolffelaar <jeroen.vanwolffelaar [...] booking.com>
Date: Mon, 15 May 2017 09:35:06 +0100
Download (untitled) / with headers
text/plain 444b
On Mon, May 08, 2017 at 10:24:52AM +0200, Jeroen van Wolffelaar via perl5-porters wrote: Show quoted text
> Dave, I'm extremely unfamiliar with the perl RT setup (as you noticed), can > you -- if needed -- create an issue in the right place for perlbug? > > I don't think having it somewhere downstream of some unrelated IO::Compress > issue is the right place.
I've now created a new ticket for it, #131316 -- Never work with children, animals, or actors.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org