[Issue 18026] Stack overflow in ddmd/dtemplate.d:6241, TemplateInstance::needsCodegen()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 25 01:28:11 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18026

Basile B. <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com

--- Comment #17 from Basile B. <b2.temp at gmx.com> ---
(In reply to Mike Franklin from comment #16)
> I've been looking into fixing this.  The problem is this block of code: 
> https://github.com/dlang/dmd/blob/750f0245c2882887cdb830c171e9221719e0da28/
> src/dmd/dtemplate.d#L6291-L6320
> 
> The whole function `needsCodegen` looks like a mess.  There's probably a way
> to implement the algorithm as a loop instead of recursive function calls,
> but I'm not yet sure what to do to fix this.

Ah, this part of code is indeed source of other issues (speculative sometimes
fails). Original op can use `-allinst` as a workaround, waiting for a fix.

--


More information about the Digitalmars-d-bugs mailing list