cat > bug.d << CODE
import std.stdio;
void main()
{
writefln("Hello %1$s!", "World");
}
CODE
dmd -run bug
----
When debugging this gdb constantly barks that it can't find the function frames.
In this specific program the format spec is incorrect.
It seems that some data/code is corrupted when linking with gold.
We should investigate whether this is an issue in dmd's codegen.
Comment #1 by atila.neves — 2013-11-14T04:28:29Z
*** Issue 11492 has been marked as a duplicate of this issue. ***
Comment #2 by atila.neves — 2013-11-14T04:31:49Z
I think the importance is higher than normal. It's not just not being able to debug, the produced executables can actually crash and do so if using std.concurrency. See this duplicate I filed:
https://d.puremagic.com/issues/show_bug.cgi?id=11492
Comment #3 by code — 2013-11-14T07:00:48Z
(In reply to comment #2)
> I think the importance is higher than normal.
I think so too, raised to critical. Seems like more people (distributions?) begin to use ld.gold. Probably due to reduced link times.
Comment #4 by code — 2013-11-14T09:30:49Z
cat > bug.d << CODE
enum Op { a, b, c, d, }
void bug(Op op)
{
final switch (op)
{
case Op.a:
case Op.b:
case Op.c:
case Op.d:
}
}
void main()
{
bug(Op.a);
}
CODE
There are an extra 8-bytes at the start of the switch table. Maybe an alignment issue?