Bug 20212 – invalid debug info with enum type in library
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-09-13T17:38:12Z
Last change time
2019-09-13T23:06:58Z
Keywords
DebugInfo, pull
Assigned to
No Owner
Creator
Rainer Schuetze
Comments
Comment #0 by r.sagitario — 2019-09-13T17:38:12Z
On git master, consider three modules:
///////////////////////////////////
module system;
enum Endian
{
bigEndian, /// Big endian byte order
littleEndian /// Little endian byte order
}
/// The endianness that the program was compiled for.
Endian endian = Endian.littleEndian;
///////////////////////////////////
module registry;
import system;
void _RVT_from_Endian(Endian endian) {}
///////////////////////////////////
module main;
import system, registry;
void main()
{
_RVT_from_Endian(Endian.littleEndian);
}
///////////////////////////////////
Build a library with
dmd -lib -ofreg.lib -g -m64 system.d registry.d
and link with main:
dmd main.d -m64 -g reg.lib
reg.lib(registry_2_61c.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Comment #1 by dlang-bot — 2019-09-13T17:46:29Z
@rainers created dlang/dmd pull request #10407 "fix issue 20212 - invalid debug info with enum type in library" fixing this issue:
- fix issue 20212 - invalid debug info with enum type in library
reusing an old type index does not work because it might be in a different object file. Let cv_debtyp() sort out duplicates instead.
https://github.com/dlang/dmd/pull/10407
dlang/dmd pull request #10407 "fix issue 20212 - invalid debug info with enum type in library" was merged into master:
- 385d172caec72f2a2610e48df9c3358e7266a5dc by Rainer Schuetze:
fix issue 20212 - invalid debug info with enum type in library
reusing an old type index does not work because it might be in a different object file. Let cv_debtyp() sort out duplicates instead.
https://github.com/dlang/dmd/pull/10407