Bug 20280 – Compiler segfault when building two small files

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-10-08T00:07:41Z
Last change time
2021-04-02T05:45:26Z
Keywords
ice, pull
Assigned to
No Owner
Creator
briancschott

Comments

Comment #0 by briancschott — 2019-10-08T00:07:41Z
Steps to reproduce: 1) Create a.d and b.d with the following contents a.d: ---------------------------------------- struct Alpha(uint _) { import a; } struct Foxtrot(uint _) { alias Attributes = Alpha!10; enum A = 10; } ---------------------------------------- b.d: ---------------------------------------- import a; alias Charlie = Foxtrot!(0); ---------------------------------------- 2) Run the compiler. `dmd a.d b.d` I've been able to reproduce this issue with several front-end versions. It is present in 2.088.1-beta.1 as well.
Comment #1 by razvan.nitu1305 — 2019-10-09T07:26:20Z
I think that a module importing itself should be an error.
Comment #2 by dlang-bot — 2019-10-10T09:34:25Z
@RazvanN7 created dlang/dmd pull request #10465 "Fix Issue 20280 - Compiler segfault when building two small files" fixing this issue: - Fix Issue 20280 - Compiler segfault when building two small files https://github.com/dlang/dmd/pull/10465
Comment #3 by dlang-bot — 2019-11-26T07:01:42Z
dlang/dmd pull request #10465 "Fix Issue 20280 - Compiler segfault when building two small files" was merged into stable: - 4e373d704bfdb7d1d18fb6bd1c7365f96fc9831a by RazvanN7: Fix Issue 20280 - Compiler segfault when building two small files https://github.com/dlang/dmd/pull/10465
Comment #4 by dlang-bot — 2021-04-02T05:45:26Z
dlang/dmd pull request #12339 "[dmd-cxx] Backport fixes and trivial features from upstream dmd" was merged into dmd-cxx: - 44a3dc29fc40fbf2c7a209db32c1ccba6239e92c by RazvanN7: [dmd-cxx] Fix Issue 20280 - Compiler segfault when building two small files https://github.com/dlang/dmd/pull/12339