Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binmode + :via + :utf8 + open => segmentation fault #13236

Open
p5pRT opened this issue Sep 6, 2013 · 8 comments
Open

binmode + :via + :utf8 + open => segmentation fault #13236

p5pRT opened this issue Sep 6, 2013 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 6, 2013

Migrated from rt.perl.org#119653 (status was 'open')

Searchable as RT119653$

@p5pRT
Copy link
Author

p5pRT commented Sep 6, 2013

From e.a.bolshakova@yandex.ru

Created by helena@cpan.org

I experience segmentation fault, the easiest demonstration​:

perl -le 'use PerlIO​::via​::QuotedPrint; binmode(\*STDERR, "​:via(PerlIO​::via​::QuotedPrint)​:utf8"); open (ERROR, ">&STDERR");'
zsh​: segmentation fault (core dumped) perl -le

I observed this behavior on FreeBSD + perl 5.14, perl 5.18, and on Ubuntu + perl 5.10, perl 5.14, perl 5.16.
On Ubuntu 8.04 + perl 5.8 the code doesn't segfault.

The problem repeats also with other layers instead of PerlIO​::via​::QuotedPrint
(I discovered the problem when using my own custom layer).

There is a discussion on StackOverflow​:
http​://stackoverflow.com/questions/18533538/binmode-mod-perl-2-0-5-parserecdescent-segmentaion-fault

I was adviced to file this bug, so I do.

Unfortunately I don't have a patch, but I hope my report will help to locate the problem.

Thanks.

Elena Bolshakova
helena@​cpan.org

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl 5.18.1:

Configured by ashdaha at Sat Aug 31 18:31:54 MSD 2013.

Summary of my perl5 (revision 5 version 18 subversion 1) configuration:
   
  Platform:
    osname=freebsd, osvers=9.1-release-p5, archname=amd64-freebsd
    uname='freebsd ashdaha.com 9.1-release-p5 freebsd 9.1-release-p5 #7 r253740: sun jul 28 16:53:08 msk 2013 roman@thor.cmc.msu.ru:usrobjusrsrcsysmini amd64 '
    config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.18/mach -Dprivlib=/usr/local/lib/perl5/5.18 -Dman3dir=/usr/local/lib/perl5/5.18/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.18/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.18 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.18/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Duse64bitint -Dusethreads=n -Dusemymalloc=n'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
    optimize='-O2 -pipe -fno-strict-aliasing',
    cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]', 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='cc', ldflags ='-pthread -Wl,-E  -fstack-protector -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil
    perllibs=-lm -lcrypt -lutil
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib -fstack-protector'

Locally applied patches:
    


@INC for perl 5.18.1:
    /usr/local/lib/perl5/5.18/BSDPAN
    /usr/local/lib/perl5/site_perl/5.18/mach
    /usr/local/lib/perl5/site_perl/5.18
    /usr/local/lib/perl5/5.18/mach
    /usr/local/lib/perl5/5.18
    .


Environment for perl 5.18.1:
    HOME=/home/lena
    LANG=ru_RU.KOI8-R
    LANGUAGE (unset)
    LC_ALL=
    LC_COLLATE=ru_RU.KOI8-R
    LC_CTYPE=ru_RU.KOI8-R
    LC_MESSAGES=C
    LC_MONETARY=ru_RU.KOI8-R
    LC_NUMERIC=ru_RU.KOI8-R
    LC_TIME=ru_RU.KOI8-R
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/lena/usr/bin:/home/lena/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/lena/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Sep 6, 2013

From @jkeenan

On Fri Sep 06 12​:38​:23 2013, e.a.bolshakova@​yandex.ru wrote​:

This is a bug report for perl from helena@​cpan.org,
generated with the help of perlbug 1.39 running under perl 5.18.1.

-----------------------------------------------------------------
[Please describe your issue here]

I experience segmentation fault, the easiest demonstration​:

perl -le 'use PerlIO​::via​::QuotedPrint; binmode(\*STDERR,
"​:via(PerlIO​::via​::QuotedPrint)​:utf8"); open (ERROR, ">&STDERR");'
zsh​: segmentation fault (core dumped) perl -le

I observed this behavior on FreeBSD + perl 5.14, perl 5.18, and on
Ubuntu + perl 5.10, perl 5.14, perl 5.16.
On Ubuntu 8.04 + perl 5.8 the code doesn't segfault.

The problem repeats also with other layers instead of
PerlIO​::via​::QuotedPrint
(I discovered the problem when using my own custom layer).

There is a discussion on StackOverflow​:
http​://stackoverflow.com/questions/18533538/binmode-mod-perl-2-0-5-
parserecdescent-segmentaion-fault

I was adviced to file this bug, so I do.

Unfortunately I don't have a patch, but I hope my report will help to
locate the problem.

Thanks.

Elena Bolshakova
helena@​cpan.org

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=medium
---
Site configuration information for perl 5.18.1​:

Configured by ashdaha at Sat Aug 31 18​:31​:54 MSD 2013.

Summary of my perl5 (revision 5 version 18 subversion 1)
configuration​:

Platform​:
osname=freebsd, osvers=9.1-release-p5, archname=amd64-freebsd
uname='freebsd ashdaha.com 9.1-release-p5 freebsd 9.1-release-p5
#7 r253740​: sun jul 28 16​:53​:08 msk 2013
roman@​thor.cmc.msu.ru​:usrobjusrsrcsysmini amd64 '
config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.18/mach
-Dprivlib=/usr/local/lib/perl5/5.18
-Dman3dir=/usr/local/lib/perl5/5.18/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.18/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.18
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.18/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Duse64bitint
-Dusethreads=n -Dusemymalloc=n'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='cc', ccflags ='-
DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include',
optimize='-O2 -pipe -fno-strict-aliasing',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]',
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='cc', ldflags ='-pthread -Wl,-E -fstack-protector
-L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lcrypt -lutil
perllibs=-lm -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector'

Locally applied patches​:

---
@​INC for perl 5.18.1​:
/usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/site_perl/5.18
/usr/local/lib/perl5/5.18/mach
/usr/local/lib/perl5/5.18
.

---
Environment for perl 5.18.1​:
HOME=/home/lena
LANG=ru_RU.KOI8-R
LANGUAGE (unset)
LC_ALL=
LC_COLLATE=ru_RU.KOI8-R
LC_CTYPE=ru_RU.KOI8-R
LC_MESSAGES=C
LC_MONETARY=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R
LD_LIBRARY_PATH (unset)
LOGDIR (unset)

PATH=/home/lena/usr/bin​:/home/lena/bin​:/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/games​:/usr/local/sbin​:/usr/local/bin​:/home/lena/bin

PERL\_BADLANG \(unset\)
SHELL=/usr/local/bin/zsh

In Porting/Maintainers.pl, this distribution is marked as 'UPSTREAM' =>
undef. For lack of a better idea, I'm cc-ing the listed maintainer.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Sep 6, 2013

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2013

From @Leont

On Fri Sep 06 12​:38​:23 2013, e.a.bolshakova@​yandex.ru wrote​:

I experience segmentation fault, the easiest demonstration​:

perl -le 'use PerlIO​::via​::QuotedPrint; binmode(\*STDERR,
"​:via(PerlIO​::via​::QuotedPrint)​:utf8"); open (ERROR, ">&STDERR");'
zsh​: segmentation fault (core dumped) perl -le

I observed this behavior on FreeBSD + perl 5.14, perl 5.18, and on
Ubuntu + perl 5.10, perl 5.14, perl 5.16.
On Ubuntu 8.04 + perl 5.8 the code doesn't segfault.

The problem repeats also with other layers instead of
PerlIO​::via​::QuotedPrint
(I discovered the problem when using my own custom layer).

There is a discussion on StackOverflow​:
http​://stackoverflow.com/questions/18533538/binmode-mod-perl-2-0-5-
parserecdescent-segmentaion-fault

I was adviced to file this bug, so I do.

Unfortunately I don't have a patch, but I hope my report will help to
locate the problem.

Thanks.

The problem here is twofold​:

1) Duplicating a :via layer is broken.
2) The code doesn't check properly if pushing the layer succeeded before
trying to set the utf8 flag.

Bug number two is easy to fix (just checking for a null-pointer). Bug
number one is a bit more involved. PerlIO​::via's GETARG method is just
broken and wrong in more than one way (it's also the cause of :via
crashing on thread duplication). Given it's also fairly useless (it
should always return the package name anyway) and undocumented, I
suspect deprecating it is the way to go.

Leon

@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2013

From @Hugmeir

On Sat, Sep 7, 2013 at 3​:30 AM, Leon Timmermans via RT <
perlbug-followup@​perl.org> wrote​:

On Fri Sep 06 12​:38​:23 2013, e.a.bolshakova@​yandex.ru wrote​:

I experience segmentation fault, the easiest demonstration​:

perl -le 'use PerlIO​::via​::QuotedPrint; binmode(\*STDERR,
"​:via(PerlIO​::via​::QuotedPrint)​:utf8"); open (ERROR, ">&STDERR");'
zsh​: segmentation fault (core dumped) perl -le

I observed this behavior on FreeBSD + perl 5.14, perl 5.18, and on
Ubuntu + perl 5.10, perl 5.14, perl 5.16.
On Ubuntu 8.04 + perl 5.8 the code doesn't segfault.

The problem repeats also with other layers instead of
PerlIO​::via​::QuotedPrint
(I discovered the problem when using my own custom layer).

There is a discussion on StackOverflow​:
http​://stackoverflow.com/questions/18533538/binmode-mod-perl-2-0-5-
parserecdescent-segmentaion-fault

I was adviced to file this bug, so I do.

Unfortunately I don't have a patch, but I hope my report will help to
locate the problem.

Thanks.

The problem here is twofold​:

1) Duplicating a :via layer is broken.
2) The code doesn't check properly if pushing the layer succeeded before
trying to set the utf8 flag.

Bug number two is easy to fix (just checking for a null-pointer). Bug
number one is a bit more involved. PerlIO​::via's GETARG method is just
broken and wrong in more than one way (it's also the cause of :via
crashing on thread duplication). Given it's also fairly useless (it
should always return the package name anyway) and undocumented, I
suspect deprecating it is the way to go.

+1

@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2013

From @Leont

On Sat, Sep 7, 2013 at 8​:30 AM, Leon Timmermans via RT <
perlbug-followup@​perl.org> wrote​:

The problem here is twofold​:

1) Duplicating a :via layer is broken.
2) The code doesn't check properly if pushing the layer succeeded before
trying to set the utf8 flag.

Bug number two is easy to fix (just checking for a null-pointer). Bug
number one is a bit more involved. PerlIO​::via's GETARG method is just
broken and wrong in more than one way (it's also the cause of :via
crashing on thread duplication). Given it's also fairly useless (it
should always return the package name anyway) and undocumented, I
suspect deprecating it is the way to go.

I just pushed df8c7de for issue 2

Leon

@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2013

From @lizmat

FWIW, I'm no longer doing any Perl 5, and therefor have no intention having a look at this.

Liz

On Sep 7, 2013, at 1​:45 AM, James E Keenan via RT <perlbug-followup@​perl.org> wrote​:

On Fri Sep 06 12​:38​:23 2013, e.a.bolshakova@​yandex.ru wrote​:

This is a bug report for perl from helena@​cpan.org,
generated with the help of perlbug 1.39 running under perl 5.18.1.

-----------------------------------------------------------------
[Please describe your issue here]

I experience segmentation fault, the easiest demonstration​:

perl -le 'use PerlIO​::via​::QuotedPrint; binmode(\*STDERR,
"​:via(PerlIO​::via​::QuotedPrint)​:utf8"); open (ERROR, ">&STDERR");'
zsh​: segmentation fault (core dumped) perl -le

I observed this behavior on FreeBSD + perl 5.14, perl 5.18, and on
Ubuntu + perl 5.10, perl 5.14, perl 5.16.
On Ubuntu 8.04 + perl 5.8 the code doesn't segfault.

The problem repeats also with other layers instead of
PerlIO​::via​::QuotedPrint
(I discovered the problem when using my own custom layer).

There is a discussion on StackOverflow​:
http​://stackoverflow.com/questions/18533538/binmode-mod-perl-2-0-5-
parserecdescent-segmentaion-fault

I was adviced to file this bug, so I do.

Unfortunately I don't have a patch, but I hope my report will help to
locate the problem.

Thanks.

Elena Bolshakova
helena@​cpan.org

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=medium
---
Site configuration information for perl 5.18.1​:

Configured by ashdaha at Sat Aug 31 18​:31​:54 MSD 2013.

Summary of my perl5 (revision 5 version 18 subversion 1)
configuration​:

Platform​:
osname=freebsd, osvers=9.1-release-p5, archname=amd64-freebsd
uname='freebsd ashdaha.com 9.1-release-p5 freebsd 9.1-release-p5
#7 r253740​: sun jul 28 16​:53​:08 msk 2013
roman@​thor.cmc.msu.ru​:usrobjusrsrcsysmini amd64 '
config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.18/mach
-Dprivlib=/usr/local/lib/perl5/5.18
-Dman3dir=/usr/local/lib/perl5/5.18/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.18/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.18
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.18/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Duse64bitint
-Dusethreads=n -Dusemymalloc=n'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='cc', ccflags ='-
DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include',
optimize='-O2 -pipe -fno-strict-aliasing',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]',
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='cc', ldflags ='-pthread -Wl,-E -fstack-protector
-L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lcrypt -lutil
perllibs=-lm -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector'

Locally applied patches​:

---
@​INC for perl 5.18.1​:
/usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/site_perl/5.18
/usr/local/lib/perl5/5.18/mach
/usr/local/lib/perl5/5.18
.

---
Environment for perl 5.18.1​:
HOME=/home/lena
LANG=ru_RU.KOI8-R
LANGUAGE (unset)
LC_ALL=
LC_COLLATE=ru_RU.KOI8-R
LC_CTYPE=ru_RU.KOI8-R
LC_MESSAGES=C
LC_MONETARY=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R
LD_LIBRARY_PATH (unset)
LOGDIR (unset)

PATH=/home/lena/usr/bin​:/home/lena/bin​:/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/games​:/usr/local/sbin​:/usr/local/bin​:/home/lena/bin

PERL_BADLANG (unset)
SHELL=/usr/local/bin/zsh

In Porting/Maintainers.pl, this distribution is marked as 'UPSTREAM' =>
undef. For lack of a better idea, I'm cc-ing the listed maintainer.

Thank you very much.
Jim Keenan

---
via perlbug​: queue​: perl5 status​: new
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=119653

@p5pRT
Copy link
Author

p5pRT commented Sep 9, 2013

From @karenetheridge

On Sat, Sep 07, 2013 at 10​:01​:18AM +0200, Elizabeth Mattijsen wrote​:

FWIW, I'm no longer doing any Perl 5, and therefor have no intention having a look at this.

Hi Liz,
Would you be interested in putting your perl5 CPAN modules up for adoption,
so that interested authors/users can continue with their maintenance and
development?

The process for requesting module adoption is described here​:

https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md#flagging-abandoned-modules-and-modules-requesting-help

Liz

On Sep 7, 2013, at 1​:45 AM, James E Keenan via RT <perlbug-followup@​perl.org> wrote​:

On Fri Sep 06 12​:38​:23 2013, e.a.bolshakova@​yandex.ru wrote​:

This is a bug report for perl from helena@​cpan.org,
generated with the help of perlbug 1.39 running under perl 5.18.1.

-----------------------------------------------------------------
[Please describe your issue here]

I experience segmentation fault, the easiest demonstration​:

perl -le 'use PerlIO​::via​::QuotedPrint; binmode(\*STDERR,
"​:via(PerlIO​::via​::QuotedPrint)​:utf8"); open (ERROR, ">&STDERR");'
zsh​: segmentation fault (core dumped) perl -le

I observed this behavior on FreeBSD + perl 5.14, perl 5.18, and on
Ubuntu + perl 5.10, perl 5.14, perl 5.16.
On Ubuntu 8.04 + perl 5.8 the code doesn't segfault.

The problem repeats also with other layers instead of
PerlIO​::via​::QuotedPrint
(I discovered the problem when using my own custom layer).

There is a discussion on StackOverflow​:
http​://stackoverflow.com/questions/18533538/binmode-mod-perl-2-0-5-
parserecdescent-segmentaion-fault

I was adviced to file this bug, so I do.

Unfortunately I don't have a patch, but I hope my report will help to
locate the problem.

Thanks.

Elena Bolshakova
helena@​cpan.org

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=medium
---
Site configuration information for perl 5.18.1​:

Configured by ashdaha at Sat Aug 31 18​:31​:54 MSD 2013.

Summary of my perl5 (revision 5 version 18 subversion 1)
configuration​:

Platform​:
osname=freebsd, osvers=9.1-release-p5, archname=amd64-freebsd
uname='freebsd ashdaha.com 9.1-release-p5 freebsd 9.1-release-p5
#7 r253740​: sun jul 28 16​:53​:08 msk 2013
roman@​thor.cmc.msu.ru​:usrobjusrsrcsysmini amd64 '
config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.18/mach
-Dprivlib=/usr/local/lib/perl5/5.18
-Dman3dir=/usr/local/lib/perl5/5.18/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.18/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.18
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.18/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Duse64bitint
-Dusethreads=n -Dusemymalloc=n'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='cc', ccflags ='-
DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include',
optimize='-O2 -pipe -fno-strict-aliasing',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]',
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='cc', ldflags ='-pthread -Wl,-E -fstack-protector
-L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lcrypt -lutil
perllibs=-lm -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector'

Locally applied patches​:

---
@​INC for perl 5.18.1​:
/usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/site_perl/5.18
/usr/local/lib/perl5/5.18/mach
/usr/local/lib/perl5/5.18
.

---
Environment for perl 5.18.1​:
HOME=/home/lena
LANG=ru_RU.KOI8-R
LANGUAGE (unset)
LC_ALL=
LC_COLLATE=ru_RU.KOI8-R
LC_CTYPE=ru_RU.KOI8-R
LC_MESSAGES=C
LC_MONETARY=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R
LD_LIBRARY_PATH (unset)
LOGDIR (unset)

PATH=/home/lena/usr/bin​:/home/lena/bin​:/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/games​:/usr/local/sbin​:/usr/local/bin​:/home/lena/bin

PERL_BADLANG (unset)
SHELL=/usr/local/bin/zsh

In Porting/Maintainers.pl, this distribution is marked as 'UPSTREAM' =>
undef. For lack of a better idea, I'm cc-ing the listed maintainer.

Thank you very much.
Jim Keenan

---
via perlbug​: queue​: perl5 status​: new
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=119653

--
  "It's hard to get a man to understand something when his
  salary depends upon his not understanding." - Upton Sinclair
  . . . . .
Karen Etheridge, karen@​etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants