Bug 10746 – Win64: corrupt debug info with very long symbols
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2013-08-02T22:52:00Z
Last change time
2015-06-09T05:12:00Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0 by r.sagitario — 2013-08-02T22:52:46Z
Here's some code to create a symbol name that is longer than 64kB:
module test;
template TypeTuple(TList...)
{
alias TList TypeTuple;
}
@property void assertCTFEable(alias dg)()
{
static assert({ dg(); return true; }());
dg();
}
alias TypeTuple!(0,1,2,3,4,5,6,7,8,9) T10;
alias TypeTuple!(T10,T10,T10,T10,T10,T10,T10,T10,T10,T10) T100;
alias TypeTuple!(T100,T100,T100,T100,T100,T100,T100,T100,T100,T100) T1000;
string to_string(string s) { return s; }
void foo()
{
assertCTFEable!(
//auto dg = (
{
foreach (i; TypeTuple!(T100,T100,T100,T100,T100,T100,T100,
T10,T10,T10,T10,T10,T10,
0))
{
assert(to_string("hello world") ==
to_string("hello world"));
}
});
}
void main() {}
build with "dmd -g -m64 test.d" to get
test.obj : fatal error LNK1103: debugging information corrupt; recompile module
--- errorlevel 1103
or with a slightly longer symbol:
LINK : fatal error LNK1318: Unexpected PDB error; RPC (23) '(0x000006BA)'
--- errorlevel 1318
This is a reduced test case from the std.string unittests.