linux 6.0.7, DMD64 D Compiler v2.101.1 and 2.101.0
code to reproduce (no small sample) :
git clone https://git.code.sf.net/p/vs4/code vs4
cd vs4
meson setup --native-file dmd.ini Builddir
cd Builddir
ninja
SIGSEGV while compiling mm/block.d
gdc (GCC) 12.2.0 and LDC - the LLVM D compiler (1.30.0) are affected too.
gdb session :
gdb /usr/bin/dmd
GNU gdb (GDB) 12.1
...
(gdb) r -I=libvs4.a.p -I=. -I=.. -I=grammar -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dmd/phobos -I/m/sw/bug/vs4 -I/m/sw/bug/vs4/grammar -I/m/sw/bug/vs4/tree -I/m/sw/bug/vs4/mm -I/m/sw/bug/vs4/tools -I/m/sw/bug/vs4/B -I/m/sw/bug/vs4/B/grammar -color=on -wi -g -debug -Xcc=-fuse-ld=mold -color=off -gdwarf=3 -version=alpha -mcpu=native -gs -gf -vcolumns -verror-style=gnu -fPIC -makedeps=libvs4.a.p/mm_block.d.o.deps -of=libvs4.a.p/mm_block.d.o -c ../mm/block.d
...
Starting program: /usr/bin/dmd -I=libvs4.a.p -I=. -I=.. -I=grammar -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dmd/phobos -I/m/sw/bug/vs4 -I/m/sw/bug/vs4/grammar -I/m/sw/bug/vs4/tree -I/m/sw/bug/vs4/mm -I/m/sw/bug/vs4/tools -I/m/sw/bug/vs4/B -I/m/sw/bug/vs4/B/grammar -color=on -wi -g -debug -Xcc=-fuse-ld=mold -color=off -gdwarf=3 -version=alpha -mcpu=native -gs -gf -vcolumns -verror-style=gnu -fPIC -makedeps=libvs4.a.p/mm_block.d.o.deps -of=libvs4.a.p/mm_block.d.o -c ../mm/block.d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x0000555555841262 in ExpressionSemanticVisitor::visit(NewExp*) ()
(gdb) bt
#0 0x0000555555841262 in ExpressionSemanticVisitor::visit(NewExp*) ()
#1 0x000055555585876f in ExpressionSemanticVisitor::visit(AssignExp*) ()
#2 0x000055555573691a in StatementSemanticVisitor::visit(ExpStatement*) ()
#3 0x0000555555736eac in StatementSemanticVisitor::visit(CompoundStatement*)
()
#4 0x00005555556c05a8 in Semantic3Visitor::visit(FuncDeclaration*) ()
#5 0x00005555556be28a in Semantic3Visitor::visit(AggregateDeclaration*) ()
#6 0x00005555556c438a in Semantic3Visitor::visit(Module*) ()
#7 0x00005555558f8de4 in dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) ()
#8 0x0000555555905c71 in D main ()
Comment #1 by petr.silhavy — 2022-12-17T13:55:42Z
Created attachment 1864
no more SIGSEGV, same test results here
Comment #2 by ibuclaw — 2022-12-17T19:09:40Z
Reduced test
---
class BlockHeader
{
this()
{
new FreeList;
}
}
class RBTree
{
class FreeList
{
}
void _each_reverse( )
{
}
}
alias FreeList = RBTree.FreeList;
---