Front page | perl.perl5.porters |
Postings from January 2012
[perl #108590] :encoding(*) IOLayers are thread-hostile when applied to STDIN
Thread Previous
From:
pm . 20 . browseruk @ xoxy . net
Date:
January 18, 2012 17:22
Subject:
[perl #108590] :encoding(*) IOLayers are thread-hostile when applied to STDIN
Message ID:
rt-3.6.HEAD-14510-1326932349-1378.108590-75-0@perl.org
# New Ticket Created by pm.20.browseruk@xoxy.net
# Please include the string: [perl #108590]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=108590 >
This is a bug report for perl from pm.20.browseruk@xoxy.net,
generated with the help of perlbug 1.39 running under perl 5.10.1.
-----------------------------------------------------------------
[Please describe your issue here]
As is, the following code cause a segfault:
#! perl -slw
use strict;
use threads;
binmode STDIN, ':encoding(UTF-8)';
#binmode STDIN, ':raw';
async{ sleep 10; }->detach;
my $in = <STDIN>;
Use binmode with any :encoding(*) on STDIN and it traps.
Comment out either the uncommented binmode or the async lines and it no
longer traps.
Comment out the encoding binmode and uncomment the :raw binmode and it no
longer traps.
Comment out both binmodes and run with -CI on the command line and it no
longer traps.
Hence the conclusion that it is the Unicode IOlayers that are thread
hostile.
Also known to occur on linux systems.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=critical
---
Site configuration information for perl 5.10.1:
Configured by sshd_server at Wed Jan 27 14:12:08 2010.
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
Platform:
osname=MSWin32, osvers=5.2, archname=MSWin32-x64-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -Wp64
-fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64
-DCONSERVATIVE -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -Ox -GL -Wp64 -fp:precise',
cppflags='-DWIN32'
ccversion='15.0.21022', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='__int64', ivsize=8, nvtype='double', nvsize=8,
Off_t='__int64', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg
-libpath:"C:\Perl64\lib\CORE" -machine:AMD64'
libpth=\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
comctl32.lib bufferoverflowU.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib bufferoverflowU.lib
msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64'
Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
0abd0d disable non-unicode case insensitive trie matching
---
@INC for perl 5.10.1:
C:/Perl64/site/lib
C:/Perl64/lib
.
---
Environment for perl 5.10.1:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\Bin\amd64;c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\vcpackages;c:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE;C:\Program Files\Microsoft
SDKs\Windows\v6.1\Bin\x64;C:\Program Files\Microsoft
SDKs\Windows\v6.1\Bin;C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework64\v2.0.50727;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
Files
(x86)\AMD\CodeAnalyst\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\lcc\bin
PERL_BADLANG (unset)
SHELL (unset)
Thread Previous