Created
March 26, 2025 16:56
-
-
Save zaucker/5800adb925e3836259387a00f5a717bc to your computer and use it in GitHub Desktop.
Raku program segfaulting with Rakudo 2025.02 and 2025.03 using Inline::Perl5 and Excel::Writer::XLSX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use lib:from<Perl5> 'perl5'; | |
| use Excel::Writer::XLSX:from<Perl5>; | |
| my $workbook = Excel::Writer::XLSX.new('testseg.xlsx'); | |
| # next line leads to segfault | |
| my $bold-format = $workbook.add_format(); | |
| # below only needed to show that things are working | |
| # without the call to add_format(); | |
| my $sheet = $workbook.add_worksheet('Test'); | |
| $sheet.write(0, 2, 'Testing'); | |
| $workbook.close(); | |
| exit; |
Author
Further golfed to:
use Excel::Writer::XLSX:from<Perl5>;
Excel::Writer::XLSX.new('testseg.xlsx').add_format;Backtrace from a freshly installed setup:
(gdb) bt
#0 0x00007fffedb31151 in Perl_sv_magicext () from /lib/x86_64-linux-gnu/libperl.so.5.38
#1 0x00007ffff4fd8eec in p5_add_magic (my_perl=0x55555555f730, inst=0x0, i=1) at p5helper.c:1328
#2 0x00007ffff799964f in dcCall_x64_sysv () from //home/cbwood/.rakubrew/versions/moar-blead/install/lib/libmoar.so
#3 0x000000000000001c in ?? ()
#4 0x00007fffffffc860 in ?? ()
#5 0x00007ffff7999479 in dc_callvm_call_x64 () from //home/cbwood/.rakubrew/versions/moar-blead/install/lib/libmoar.so
#1 look suspicious to me.
(rr) call MVM_dump_backtrace(tc)
at site#sources/FE0EA2E16CD0CD31716830FEE610E9B4116A2281 (Inline::Perl5):92 (/var/home/timo/raku/prefix/share/perl6/site/precomp/BCCF8C81D61C7AC88430AF9DF519914C49A1AC45/FE/FE0EA2E16CD0CD31716830FEE610E9B4116A2281:unwrap-perl5-object)
from site#sources/CB13ADC95AD47173DDB66919ED2F553BACEDDF71 (Inline::Perl5::ClassHOW):567 (/var/home/timo/raku/prefix/share/perl6/site/precomp/BCCF8C81D61C7AC88430AF9DF519914C49A1AC45/CB/CB13ADC95AD47173DDB66919ED2F553BACEDDF71:one-arg)
from SETTING::src/core.c/Mu.rakumod:158 (/var/home/timo/raku/prefix/share/perl6/runtime/CORE.c.setting.moarvm:bless)
from site#sources/FE0EA2E16CD0CD31716830FEE610E9B4116A2281 (Inline::Perl5):329 (/var/home/timo/raku/prefix/share/perl6/site/precomp/BCCF8C81D61C7AC88430AF9DF519914C49A1AC45/FE/FE0EA2E16CD0CD31716830FEE610E9B4116A2281:p5_to_p6_type)
from site#sources/FE0EA2E16CD0CD31716830FEE610E9B4116A2281 (Inline::Perl5):411 (/var/home/timo/raku/prefix/share/perl6/site/precomp/BCCF8C81D61C7AC88430AF9DF519914C49A1AC45/FE/FE0EA2E16CD0CD31716830FEE610E9B4116A2281:unpack_return_values)
from site#sources/CB13ADC95AD47173DDB66919ED2F553BACEDDF71 (Inline::Perl5::ClassHOW):540 (/var/home/timo/raku/prefix/share/perl6/site/precomp/BCCF8C81D61C7AC88430AF9DF519914C49A1AC45/CB/CB13ADC95AD47173DDB66919ED2F553BACEDDF71:no-args)
from test.raku:6 (<ephemeral file>:<unit>)
from test.raku:1 (<ephemeral file>:<unit-outer>)
from NQP::src/HLL/Compiler.nqp:197 (/var/home/timo/raku/prefix/share/nqp/lib/NQPHLL.moarvm:eval)
this is the backtrace at the moar level to where the call to p5_add_magic happens. I haven't looked yet what this "magic" is about, but inst being a null pointer is probably not right
Looks like rakudo/rakudo@ea1831c79f is to blame
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with
perl5/containing an installation of the Perl5 moduleExcel::Writer::XLSXthis script segfaults. Commenting out the line calling
add_format()avoids the segfault