Bug 17290 – DMD crash due to circular reference in function return type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-04-01T18:08:44Z
Last change time
2020-03-21T03:56:41Z
Keywords
ice, pull
Assigned to
No Owner
Creator
lyrachord

Comments

Comment #0 by fyaoxy — 2017-04-01T18:08:44Z
f.T f(){ } void main(){ }
Comment #1 by razvan.nitu1305 — 2017-04-03T11:00:13Z
Could you please be more explicit?
Comment #2 by ag0aep6g — 2017-04-03T11:21:52Z
(In reply to RazvanN from comment #1) > Could you please be more explicit? Try to compile the given code. dmd crashes with a segmentation fault. It shouldn't crash, but show an error message.
Comment #3 by b2.temp — 2019-03-01T08:52:28Z
There's a cycle when trying to solve T. Somewhere the ".inuse" member of the declaration of function "f" must be incremented and later decremented to detect the cycle. Just gotta find the right place, using the backtrace of the ICE, because this case is tricky. You can fix it at several place but then it breaks the test suite or even some stuff in druntime.
Comment #4 by dlang-bot — 2019-03-02T08:52:03Z
@Basile-z created dlang/dmd pull request #9403 "fix issue 17290 - DMD crash due to circular reference in function return type" fixing this issue: - fix issue 17290 - DMD crash due to circular reference in function return type https://github.com/dlang/dmd/pull/9403
Comment #5 by b2.temp — 2019-03-02T09:55:47Z
*** Issue 17140 has been marked as a duplicate of this issue. ***
Comment #6 by dlang-bot — 2019-03-02T11:20:22Z
dlang/dmd pull request #9403 "fix issue 17290 - DMD crash due to circular reference in function return type" was merged into master: - e10fb38ed81aa27fe688cef0c36f8cc3da2948dc by Basile Burg: fix issue 17290 - DMD crash due to circular reference in function return type https://github.com/dlang/dmd/pull/9403
Comment #7 by dlang-bot — 2019-06-16T20:57:31Z
dlang/dmd pull request #10046 "[dmd-cxx] Backport semanticRun refactoring and recursive semantic SEGV bug fixes" was merged into dmd-cxx: - d7dc83daead6b5ac8413e55fc3cff706ead7da18 by Basile Burg: fix issue 17290 - DMD crash due to circular reference in function return type https://github.com/dlang/dmd/pull/10046