Subject: | Tk segfaults under perl 5.20.0 |
Date: | Fri, 6 Jun 2014 07:10:46 -0600 |
To: | bug-Tk [...] rt.cpan.org |
From: | "Brian F. G. Bidulock" <bidulock [...] openss7.org> |
Tk simply crashes when run under perl 5.20.0.
The problem seems related to new UTF-8 handling in perl 5.20.0:
Tcl_GetStringFromObj() performs a lot of perambulations and
questionable use of things like sv_utf8_upgrade(), but I'm not
sure.
Note the differences in core dumps below betweem LANG=en_CA.utf8
and LANG=
Tk-804.032
perl 5.20.0
Archlinux current: Linux 3.10.41-1-lts #1 SMP Sun Jun 1 08:55:32 UTC 2014 x86_64 GNU/Linux
Archlinux bug report: https://bugs.archlinux.org/task/40692
$> ulimit -c 4096
$> LANG=en_CA.utf8 perl -MTk -e '$mw = new MainWindow'
Segmentation fault (core dumped)
$> sudo systemd-coredumpctl gdb
Core was generated by `perl -MTk -e $mw = new MainWindow'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xb6f15c42 in Tcl_GetStringFromObj () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
(gdb) bt
#0 0xb6f15c42 in Tcl_GetStringFromObj () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#1 0xb6f15f3a in Tcl_GetString () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#2 0xb6f954e1 in Tk_SetOptions () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#3 0xb6f48213 in ConfigureFrame () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#4 0xb6f48e5c in CreateFrame.isra.3 () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#5 0xb6f24a90 in XS_Tk__MainWindow_Create () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#6 0xb766a08c in Perl_pp_entersub () from /usr/lib/perl5/core_perl/CORE/libperl.so
#7 0xb7662af7 in Perl_runops_standard () from /usr/lib/perl5/core_perl/CORE/libperl.so
#8 0xb75f66b3 in perl_run () from /usr/lib/perl5/core_perl/CORE/libperl.so
#9 0x08048aaf in main ()
(gdb)
$> ulimit -c 4096
$> LANG= perl -MTk -e '$mw = new MainWindow'
Segmentation fault (core dumped)
$> sudo systemd-coredumpctl gdb
Core was generated by `perl -MTk -e $mw = new MainWindow'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xb76405ab in S_sv_uncow () from /usr/lib/perl5/core_perl/CORE/libperl.so
(gdb) bt
#0 0xb76405ab in S_sv_uncow () from /usr/lib/perl5/core_perl/CORE/libperl.so
#1 0xb7645b4e in Perl_sv_utf8_upgrade_flags_grow () from /usr/lib/perl5/core_perl/CORE/libperl.so
#2 0xb720ddf6 in Tcl_GetStringFromObj () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#3 0xb720df3a in Tcl_GetString () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#4 0xb728d4e1 in Tk_SetOptions () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#5 0xb7240213 in ConfigureFrame () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#6 0xb7240e5c in CreateFrame.isra.3 () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#7 0xb721ca90 in XS_Tk__MainWindow_Create () from /usr/lib/perl5/vendor_perl/auto/Tk/Tk.so
#8 0xb763108c in Perl_pp_entersub () from /usr/lib/perl5/core_perl/CORE/libperl.so
#9 0xb7629af7 in Perl_runops_standard () from /usr/lib/perl5/core_perl/CORE/libperl.so
#10 0xb75bd6b3 in perl_run () from /usr/lib/perl5/core_perl/CORE/libperl.so
#11 0x08048aaf in main ()
(gdb)
--brian