Bug 22874 – ICE: Segmentation fault building druntime on mips64el-linux

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2022-03-11T18:09:07Z
Last change time
2022-03-11T19:41:08Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2022-03-11T18:09:07Z
Looks like the D version of `new(&ue)`, `emplaceExp!()` is stack corrupting. d21: internal compiler error: Segmentation fault 0x1203cbc7f _D3dmd10dinterpret11Interpreter21interpretAssignCommonMFCQCd10expression6BinExpPFKxS QDe7globals3LocCQDu5mtype4TypeCQEjQCg10ExpressionQtZSQFfQDc8UnionExpiZv ../../src/gcc/d/dmd/dinterpret.d:3678 0x1203b7de3 _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCcQz10ExpressionPSQCvQCu10I nterStateEQDoQDn8CTFEGoalZQCd ../../src/gcc/d/dmd/dinterpret.d:6420 0x1203b7de3 _D3dmd10dinterpret15interpretRegionFCQBj10expression10ExpressionPSQCmQCl10InterState EQDfQDe8CTFEGoalZQCn ../../src/gcc/d/dmd/dinterpret.d:6448 0x1203cf5a3 Interpreter::visit(CallExp*) ../../src/gcc/d/dmd/dinterpret.d:4843 0x1203b855b _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCcQz10ExpressionPSQCvQCu10I nterStateEQDoQDn8CTFEGoalZQCd ../../src/gcc/d/dmd/dinterpret.d:6420 0x1203b855b Interpreter::visit(ExpStatement*) ../../src/gcc/d/dmd/dinterpret.d:805 0x1203b855b Interpreter::visit(ExpStatement*) ../../src/gcc/d/dmd/dinterpret.d:790 0x1203b8c7b _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCc9statement9StatementPSQDbQDa10InterStateZCQDvQCs10Expression ../../src/gcc/d/dmd/dinterpret.d:6485 0x1203b8c7b Interpreter::visit(IfStatement*) ../../src/gcc/d/dmd/dinterpret.d:907 0x1203b577b _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCc9statement9StatementPSQDbQDa10InterStateZCQDvQCs10Expression ../../src/gcc/d/dmd/dinterpret.d:6485 0x1203b577b Interpreter::visit(CompoundStatement*) ../../src/gcc/d/dmd/dinterpret.d:823 0x1203b577b _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCc9statement9StatementPSQDbQDa10InterStateZCQDvQCs10Expression ../../src/gcc/d/dmd/dinterpret.d:6485 0x1203b577b Interpreter::visit(CompoundStatement*) ../../src/gcc/d/dmd/dinterpret.d:823 0x1203c5b97 _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCc9statement9StatementPSQDbQDa10InterStateZCQDvQCs10Expression ../../src/gcc/d/dmd/dinterpret.d:6485 0x1203c5b97 _D3dmd10dinterpret17interpretFunctionFPSQBm10expression8UnionExpCQCl4func15FuncDeclarationPSQDmQDl10InterStatePSQEg4root5array__T5ArrayTCQFfQDt10ExpressionZQBbQxZQBa ../../src/gcc/d/dmd/dinterpret.d:644 0x1203cefcf Interpreter::visit(CallExp*) ../../src/gcc/d/dmd/dinterpret.d:4962 0x1203b9483 _D3dmd10dinterpret9interpretFPSQBd10expression8UnionExpCQCcQz10ExpressionPSQCvQCu10InterStateEQDoQDn8CTFEGoalZQCd ../../src/gcc/d/dmd/dinterpret.d:6420 0x1203b9483 Interpreter::visit(ReturnStatement*) ../../src/gcc/d/dmd/dinterpret.d:1037 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. make[7]: *** [Makefile:2475: core/internal/parseoptions.lo] Error 1
Comment #1 by dlang-bot — 2022-03-11T18:10:57Z
@ibuclaw updated dlang/dmd pull request #13805 "dmd.expression: Emplace initializer on preallocated pointer instead of temporary" fixing this issue: - fix Issue 22874 - ICE: Segmentation fault building druntime on mips64el-linux Emplace initializer on preallocated pointer instead of temporary in dmd.expression. https://github.com/dlang/dmd/pull/13805
Comment #2 by dlang-bot — 2022-03-11T19:41:08Z
dlang/dmd pull request #13805 "dmd.expression: Emplace initializer on preallocated pointer instead of temporary" was merged into master: - 719405c30b11f8e42ca856cff275e5e3584a1d52 by Iain Buclaw: fix Issue 22874 - ICE: Segmentation fault building druntime on mips64el-linux Emplace initializer on preallocated pointer instead of temporary in dmd.expression. https://github.com/dlang/dmd/pull/13805