digitalmars.D - Segmentation fault building druntime head on OS X
- Paolo Invernizzi (117/117) Dec 01 2014 Hi,
- John Colvin (7/127) Dec 01 2014 I get the same. Two separate dustmite reductions got me
- Sean Kelly (3/3) Dec 01 2014 A few years back, clang was generating an invalid copy ctor for a
- Jacob Carlborg (5/8) Dec 01 2014 Lately I've only been able to successfully run the whole test suite for
- Sean Kelly (8/16) Dec 01 2014 So I get the DMD crash building *anything* with the release
Hi, Just to know if someone else has the same issue: OS X 10.10.1 Xcode 6.1 (6a1052d) cc --version Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) DMD is builded just fine: DMD64 D Compiler v2.067-devel-e17631e But the dmd crash on building druntime: semantic3 treap semantic3 ti_AC semantic3 ti_Acdouble semantic3 ti_Acfloat Process 5286 stopped dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45 dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45: -> 0x10002df7d: movaps %xmm1, 0x40(%rdi) 0x10002df81: movaps %xmm0, 0x30(%rdi) 0x10002df85: movq %rcx, 0x20(%rdi) 0x10002df89: popq %rbp (lldb) bt dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45 Expression*) + 879 dmd`Expression_optimize(Expression*, int, bool)::OptimizeVisitor::visit(CastExp*) + 964 dmd`Expression_optimize(Expression*, int, bool)::OptimizeVisitor::visit(BinExp*) + 133 dmd`Expression_optimize(Expression*, int, bool) + 42 dmd`ExpStatement::semantic(Scope*) + 94 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`IfStatement::semantic(Scope*) + 783 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`FuncDeclaration::semantic3(Scope*) + 3425 dmd`FuncDeclaration::functionSemantic3() + 102 Scope*, TypeFunction*, Type*, Array<Expression*>*, FuncDeclaration*, Type**, Expression**) + 277 dmd`CallExp::semantic(Scope*) + 11822 dmd`BinExp::binSemanticProp(Scope*) + 42 dmd`op_overload(Expression*, Scope*)::OpOverload::visit(BinAssignExp*) + 1645 dmd`op_overload(Expression*, Scope*) + 44 dmd`BinAssignExp::semantic(Scope*) + 45 dmd`ExpStatement::semantic(Scope*) + 35 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`ForStatement::semantic(Scope*) + 657 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`ScopeStatement::semantic(Scope*) + 158 dmd`ForStatement::semantic(Scope*) + 240 dmd`ForeachStatement::semantic(Scope*) + 14741 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`FuncDeclaration::semantic3(Scope*) + 3425 dmd`AttribDeclaration::semantic3(Scope*) + 85 dmd`TemplateInstance::semantic3(Scope*) + 276 dmd`TemplateInstance::semantic(Scope*, Array<Expression*>*) + 2425 dmd`ScopeExp::semantic(Scope*) + 154 dmd`DotIdExp::semanticX(Scope*) + 30 CallExp*) + 129 dmd`CallExp::semantic(Scope*) + 455 dmd`ReturnStatement::semantic(Scope*) + 677 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`FuncDeclaration::semantic3(Scope*) + 3425 dmd`AggregateDeclaration::semantic3(Scope*) + 228 char const**) + 10560 (lldb) That's a clean build from Digger... Thanks in advance. --- Paolo
Dec 01 2014
On Monday, 1 December 2014 at 09:48:20 UTC, Paolo Invernizzi wrote:Hi, Just to know if someone else has the same issue: OS X 10.10.1 Xcode 6.1 (6a1052d) cc --version Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) DMD is builded just fine: DMD64 D Compiler v2.067-devel-e17631e But the dmd crash on building druntime: semantic3 treap semantic3 ti_AC semantic3 ti_Acdouble semantic3 ti_Acfloat Process 5286 stopped dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45 dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45: -> 0x10002df7d: movaps %xmm1, 0x40(%rdi) 0x10002df81: movaps %xmm0, 0x30(%rdi) 0x10002df85: movq %rcx, 0x20(%rdi) 0x10002df89: popq %rbp (lldb) bt dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) dmd`ComplexExp::ComplexExp(Loc, complex_t, Type*) + 45 Expression*) + 879 dmd`Expression_optimize(Expression*, int, bool)::OptimizeVisitor::visit(CastExp*) + 964 dmd`Expression_optimize(Expression*, int, bool)::OptimizeVisitor::visit(BinExp*) + 133 dmd`Expression_optimize(Expression*, int, bool) + 42 dmd`ExpStatement::semantic(Scope*) + 94 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`IfStatement::semantic(Scope*) + 783 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`FuncDeclaration::semantic3(Scope*) + 3425 dmd`FuncDeclaration::functionSemantic3() + 102 dmd`functionParameters(Loc, Scope*, TypeFunction*, Type*, Array<Expression*>*, FuncDeclaration*, Type**, Expression**) + 277 dmd`CallExp::semantic(Scope*) + 11822 dmd`BinExp::binSemanticProp(Scope*) + 42 dmd`op_overload(Expression*, Scope*)::OpOverload::visit(BinAssignExp*) + 1645 dmd`op_overload(Expression*, Scope*) + 44 dmd`BinAssignExp::semantic(Scope*) + 45 dmd`ExpStatement::semantic(Scope*) + 35 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`ForStatement::semantic(Scope*) + 657 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`ScopeStatement::semantic(Scope*) + 158 dmd`ForStatement::semantic(Scope*) + 240 dmd`ForeachStatement::semantic(Scope*) + 14741 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`FuncDeclaration::semantic3(Scope*) + 3425 dmd`AttribDeclaration::semantic3(Scope*) + 85 dmd`TemplateInstance::semantic3(Scope*) + 276 dmd`TemplateInstance::semantic(Scope*, Array<Expression*>*) + 2425 dmd`ScopeExp::semantic(Scope*) + 154 dmd`DotIdExp::semanticX(Scope*) + 30 CallExp*) + 129 dmd`CallExp::semantic(Scope*) + 455 dmd`ReturnStatement::semantic(Scope*) + 677 dmd`CompoundStatement::semantic(Scope*) + 284 dmd`FuncDeclaration::semantic3(Scope*) + 3425 dmd`AggregateDeclaration::semantic3(Scope*) + 228 84 long, char const**) + 10560 (lldb) That's a clean build from Digger... Thanks in advance. --- PaoloI get the same. Two separate dustmite reductions got me https://issues.dlang.org/show_bug.cgi?id=13795 and https://issues.dlang.org/show_bug.cgi?id=13788 I suspect it's showing up because of building with clang. IIRC it only happens if you build a release version of the compiler.
Dec 01 2014
A few years back, clang was generating an invalid copy ctor for a struct in DMD. I assume this has long since been fixed, but clearly clang still has a few bugs.
Dec 01 2014
On 2014-12-01 18:03, Sean Kelly wrote:A few years back, clang was generating an invalid copy ctor for a struct in DMD. I assume this has long since been fixed, but clearly clang still has a few bugs.Lately I've only been able to successfully run the whole test suite for DMD if it was compiled with Clang. -- /Jacob Carlborg
Dec 01 2014
On Monday, 1 December 2014 at 20:42:06 UTC, Jacob Carlborg wrote:On 2014-12-01 18:03, Sean Kelly wrote:So I get the DMD crash building *anything* with the release version of DMD from git HEAD. I generated a debug build though and it works fine. So it sounds like a codegen bug to me, but I haven't taken the time to try and figure it out. The crash I saw was in a ctor though. If it's anything like the crash I saw back when OS X was moving to clang, it will be that the "this" pointer has a bad offset.A few years back, clang was generating an invalid copy ctor for a struct in DMD. I assume this has long since been fixed, but clearly clang still has a few bugs.Lately I've only been able to successfully run the whole test suite for DMD if it was compiled with Clang.
Dec 01 2014