Bug 3601 – Debug and Release builds of DMD produce different object files

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2009-12-08T07:46:00Z
Last change time
2015-06-09T01:26:49Z
Assigned to
nobody
Creator
2korden

Attachments

IDFilenameSummaryContent-TypeSize
523thread.dTest case that reproduces described behaviorapplication/octet-stream6203

Comments

Comment #0 by 2korden — 2009-12-08T07:46:08Z
(Not to be confused with -debug and -release DMD options) I finally managed to cut that sucker down (took me almost entire day to track it down and reduce to reasonable size)! The test case is attached, compile it as follows: dmd -c -d thread.d Tested on DMD2.032, Windows only. I believe Debug version produces corrupted binaries as linking sometimes fails giving me a "library is corrupted" message. I should add that this one is very annoying as it prevents ddmd from working properly (it only works in debug mode ATM and debug version of backend produces odd binaries).
Comment #1 by 2korden — 2009-12-08T07:47:32Z
Created attachment 523 Test case that reproduces described behavior Based off druntime/core/thread.d file
Comment #2 by bugzilla — 2009-12-12T01:49:46Z
Changeset 293 gets them to produce the same .obj files, but both ways were within spec and I've never seen either produce a "library is corrupted" message. So I'll set this as fixed, and if the corruption message appears again, please file a new issue.
Comment #3 by bugzilla — 2009-12-31T11:16:20Z
Fixed dmd 1.054 and 2.038