Bug 20348 – [Reg 2.089.0-rc.1] Bad debug info for enum forward references
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-11-02T10:16:20Z
Last change time
2019-12-20T07:54:15Z
Keywords
DebugInfo, pull
Assigned to
No Owner
Creator
Rainer Schuetze
Comments
Comment #0 by r.sagitario — 2019-11-02T10:16:20Z
module endbg;
enum EnumTest
{
E1, E2, E3
}
void main()
{
EnumTest e1 = EnumTest.E1;
EnumTest e2 = EnumTest.E2;
}
Compiling this with "dmd -m64 -g endbg.d" and dumping it with cvdump yields:
...
0x1006 : Length = 29, Leaf = 0x1507 LF_ENUM
# members = 0, type = T_INT4(0074) field list type 0x0000
FORWARD REF, enum name = endbg.EnumTest
0x1007 : Length = 29, Leaf = 0x1507 LF_ENUM
# members = 0, type = T_INT4(0074) field list type 0x0000
FORWARD REF, enum name = endbg.EnumTest
...
i.e. the forward reference is emitted multiple times and has an odd length (which can cause the debugger to crash).
Comment #1 by dlang-bot — 2019-11-02T10:21:39Z
@rainers created dlang/dmd pull request #10530 "fix issue 20348 - Bad debug info for enum forward reference" fixing this issue:
- fix issue 20348 - Bad debug info for enum forward reference
do not rewrite the length of the debug record, it is padded during allocation
https://github.com/dlang/dmd/pull/10530
Comment #2 by dlang-bot — 2019-11-04T09:28:14Z
dlang/dmd pull request #10530 "fix issue 20348 - Bad debug info for enum forward reference" was merged into stable:
- 51fafbcc02dfd2cd3808b4f5b262a821dfcd8156 by Rainer Schuetze:
fix issue 20348 - Bad debug info for enum forward reference
do not rewrite the length of the debug record, it is padded during allocation
https://github.com/dlang/dmd/pull/10530
Comment #3 by dlang-bot — 2019-12-20T07:54:15Z
dlang/dmd pull request #10484 "Merge remote-tracking branch 'upstream/stable' into merge_stable" was merged into master:
- 4b09b59068ae4c76fad1bffbd255e3f87ac448fd by Rainer Schuetze:
fix issue 20348 - Bad debug info for enum forward reference
do not rewrite the length of the debug record, it is padded during allocation
https://github.com/dlang/dmd/pull/10484