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
segmentation fault Running binmode(STDOUT, ":encoding(utf8)") with ithreads #8716
Comments
From imacat@mail.imacat.idv.twCreated by imacat@mail.imacat.idv.tw Hi. This is imacat from Taiwan. Perl crashed when spawning threads The demostration is below. Please tell me if you need any information. imacat@rinse ~ % perl -mthreads -e'binmode STDOUT, ":utf8"; threads->new(sub { })->join;' Perl Info
|
From ulfer.dm@gmail.comCreated by alexdm@lwd.ruWhen Perl starts another interpreter thread, it segfaults bug.pl: check_utf8.pm: It doesn't matter whether any code is called in async { } However, if you write bug.pl like this: it will work perfectly. I should notice that This bug was discovered in ActivePerl under windows 2000 wbr, Alexey. Perl Info
|
From alex.davies@talktalk.netCreated by alex@AMELIEThe following crashes with 5.8, 5.10 & blead: # %< my $BUG = 1; binmode STDOUT, ":encoding(utf8)" or die if (0 and $^O eq 'MSWin32') { sub doit { my $f = $0; # arbitrary file If BUG is set to false ie. STDOUT is encoded in the thread, It crashes in PerlIOEncode_getarg() in encoding.xs The point where it crashes is beneath sv.c:11887: PerlIO_clone(aTHX_ proto_perl, param); in perl_clone() but PL_curstackinfo is not initialised sv.c:12240: PL_curstackinfo = si_dup(proto_perl->Icurstackinfo, param); So i guess the order of the initializations needs shuffling... Cheers, Perl Info
|
@jkeenan - Status changed from 'new' to 'open' |
From @sciuriusPerl 5.18.0: % perl -e 'use But: % perl -e 'use threads;binmode(STDOUT,":utf8");threads->create(sub{})' ... 6 years, already ... |
From @dcollinsnFixed by: 0ee3fa2 is the first new commit Properly duplicate PerlIO::encoding objects PerlIO::encoding objects are usually initialized by calling Perl methods, The proper way to duplicate the PerlIO::encoding object is to call sv_dup() This fixes [RT #31923]. :100644 100644 f79df008098f4df1f97f7f104171b89c31049a90 34c2e2436a2a14e776725ca5c40a74c8f0a4bdb7 M MANIFEST 5.22 is still broken, needs to be backported to next maint release? Testing my test now. -- |
From @cpansproutOn Thu Jul 14 13:25:12 2016, dcollinsn@gmail.com wrote:
Did this also fix #85366? -- Father Chrysostomos |
From @dcollinsnTest added in 68ca57d, closing. -- |
From [Unknown Contact. See original ticket]Test added in 68ca57d, closing. -- |
@dcollinsn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#41121 (status was 'resolved')
Searchable as RT41121$
The text was updated successfully, but these errors were encountered: