Using dd on a LibXML::Document raises a SIGSEGV
Follow up of:
rakudo/rakudo#5052
Copying jonathanstowe analysis:
Trimming it somewhat to:
use LibXML;
use LibXML::Document;
sub MAIN(){
my LibXML::Document $doc .= parse: :string('<doc />');
dd $doc;
}
Gives a back trace:
Thread 1 "rakudo-m" received signal SIGSEGV, Segmentation fault.
0x00007ffff788ec2f in get_attribute () from //usr/local/lib/libmoar.so
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.35-15.fc36.x86_64 libxml2-devel-2.9.14-1.fc36.x86_64 xz-libs-5.2.5-9.fc36.x86_64 zlib-1.2.11-32.fc36.x86_64
(gdb) bt full
#0 0x00007ffff788ec2f in get_attribute () from //usr/local/lib/libmoar.so
No symbol table info available.
#1 0x00007ffff7814494 in MVM_interp_run () from //usr/local/lib/libmoar.so
No symbol table info available.
#2 0x00000000004015ef in main ()
No symbol table info available.
It would appear that the segfault is from trying to obtain the value of an attribute of the LibXML::Document object (it also will happen with say $doc.raku,) which would suggest that some otherwise unused attribute of the CStruct of LibXML::Document is defined with the incorrect size.
So it's likely that this is a problem with LibXML rather than rakudo.
Using dd on a LibXML::Document raises a SIGSEGV
Follow up of:
rakudo/rakudo#5052
Copying jonathanstowe analysis: