Getting compiler Segfault
H. S. Teoh
hsteoh at quickfur.ath.cx
Mon Feb 5 05:40:53 UTC 2018
On Sun, Feb 04, 2018 at 12:52:22PM +0000, Ur at nuz via Digitalmars-d-learn wrote:
> Getting compiler stack overflow when building my project, but still do
> not know how to localize piece of code that triggers this bug. Maybe
> this bug is already registered in bugzilla or someone could give some
> advice where to dig into?
>
> Just runed building under gdb and got the following stack trace:
[...]
I'm not 100% familiar with the dmd code, but here's my guess as to the
approximate location of the problem, based on looking at the stack
trace:
- It's probably inside a protection declaration, perhaps something like
`private { ... }` or `protected { ... }` or something along those
lines.
- There appears to be an import statement somewhere in there, that
appears to lead to another module with another import;
- Eventually, it ends in what looks like a recursive alias to an
overload that appears to be in a loop, which is likely the cause of
the compiler crash.
So my wild guess is that there's probably an alias (or multiple aliases)
somewhere in your code that brings in a symbol into an overload set, and
somehow these aliases are referring to each other in a loop. Quite
likely this alias resides in a module imported by another module, which
in turn is imported from within the protection block.
Don't know if this helps, but hopefully it narrows down the problem
somewhat.
T
--
People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG
More information about the Digitalmars-d-learn
mailing list