Comment #0 by dlang-bugzilla — 2023-06-20T08:25:25Z
Created attachment 1882
Reproducer
Given certain inputs, dmd will produce output that lld-link refuses to consume, failing with the message:
lld-link: error: codeview::mergeTypeAndIdRecords failed: The CodeView record is corrupted.
Unfortunately it is difficult to reduce the exact inputs which trigger this bug. It seems to be related to the size of the program being compiled, and maybe things like exact alignment. It may be a buffer overflow that causes the output to be corrupted only under certain conditions.
I am attaching an input which reliably reproduces the problem with DMD 2.101.0 for Windows, as obtainable from https://downloads.dlang.org/releases/2.x/2.101.0/dmd.2.101.0.windows.7z. Other versions of D may or may not reproduce the bug, as I'm sure that changes in Phobos/Druntime affect the outcome as well.
To reproduce, edit reproduce.cmd to point it to the path to where your copy of the 2.101.0 dmd.exe is located, and run it. You should get a bunch of deprecation warnings followed by the link error above.
Comment #1 by robert.schadek — 2024-12-13T19:29:45Z