Bug 9639 – Recursive template instanciation segfault dmd

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-03T05:08:00Z
Last change time
2013-11-25T12:17:28Z
Keywords
ice, pull
Assigned to
nobody
Creator
deadalnix

Comments

Comment #0 by deadalnix — 2013-03-03T05:08:13Z
Sample code : class A { this(A) {} } class B { } typeof(null) foo(alias handler)(A a) { handler(a); B b; return foo!handler(b); } typeof(null) foo(alias handler)(B) { A a; return foo!handler(a); } auto bar() { A a; foo!((stuff) { new A(a); })(a); } Note that foo instantiate itself with the same parameters every time, so it shouldn't go into infinite recursion.
Comment #1 by bugzilla — 2013-10-07T00:06:20Z
Shows up as a stack overflow on dmd for Windows.
Comment #2 by k.hara.pg — 2013-11-24T23:48:25Z
Comment #3 by github-bugzilla — 2013-11-25T12:17:15Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ee9e7d65eab602cdb67b3663b10f3d44ec08fada fix Issue 9639 - Recursive template instanciation segfault dmd https://github.com/D-Programming-Language/dmd/commit/66e0b4e36b451711d0884a5ecad4d93a55afd46c Merge pull request #2878 from 9rnsr/fix9639 [REG2.062] Issue 9639 - Recursive template instanciation segfault dmd