Thread overview
[Feature Request] - DMD debug build distribution
Nov 13, 2022
Hipreme
Nov 13, 2022
WebFreak001
Nov 13, 2022
Hipreme
Nov 13, 2022
Walter Bright
Nov 13, 2022
Hipreme
Nov 14, 2022
Hipreme
November 13, 2022

My project seems to be crashing DMD sometimes on its compilation. Would be nice to have a DMD debug build for distribution, it attempts to call JIT Debugger for dmd.exe right before it starts linking. I'm using Windows 10.

November 13, 2022

On Sunday, 13 November 2022 at 15:15:54 UTC, Hipreme wrote:

>

My project seems to be crashing DMD sometimes on its compilation. Would be nice to have a DMD debug build for distribution, it attempts to call JIT Debugger for dmd.exe right before it starts linking. I'm using Windows 10.

compiling DMD takes just a few seconds on recent machines, even compiles in about under 10 seconds on my old laptop, so I would recommend building it from source.

You can find build instructions on https://wiki.dlang.org/Building_under_Windows

Using digger it seems you can simply enable it by turning on components.dmd.debugDMD in the digger.ini file (that you can copy from the sample in the git repository)

November 13, 2022
On 11/13/2022 7:15 AM, Hipreme wrote:
> My project seems to be crashing DMD sometimes on its compilation. Would be nice to have a DMD debug build for distribution, it attempts to call JIT Debugger for dmd.exe right before it starts linking. I'm using Windows 10.

If you can reduce the test case that causes dmd to crash, we can fix it. Please report it to bugzilla!
November 13, 2022

On Sunday, 13 November 2022 at 16:25:30 UTC, WebFreak001 wrote:

>

On Sunday, 13 November 2022 at 15:15:54 UTC, Hipreme wrote:

>

My project seems to be crashing DMD sometimes on its compilation. Would be nice to have a DMD debug build for distribution, it attempts to call JIT Debugger for dmd.exe right before it starts linking. I'm using Windows 10.

compiling DMD takes just a few seconds on recent machines, even compiles in about under 10 seconds on my old laptop, so I would recommend building it from source.

You can find build instructions on https://wiki.dlang.org/Building_under_Windows

Using digger it seems you can simply enable it by turning on components.dmd.debugDMD in the digger.ini file (that you can copy from the sample in the git repository)

Nope, does not compile here.
src\dmd\backend\blockopt.d(1164): Error: @safe function dmd.backend.blockopt.compdfo cannot call @system function core.stdc.stdio.printf

November 13, 2022
On Sunday, 13 November 2022 at 18:26:38 UTC, Walter Bright wrote:
> On 11/13/2022 7:15 AM, Hipreme wrote:
>> My project seems to be crashing DMD sometimes on its compilation. Would be nice to have a DMD debug build for distribution, it attempts to call JIT Debugger for dmd.exe right before it starts linking. I'm using Windows 10.
>
> If you can reduce the test case that causes dmd to crash, we can fix it. Please report it to bugzilla!


Sorry, I have no faint idea on how I could reduce a project that big, I actually believe I'm hitting an edge case, the same way I was hitting before the package.d, which I just circumvent by changing the file name.
November 14, 2022
On Sunday, 13 November 2022 at 18:26:38 UTC, Walter Bright wrote:
> On 11/13/2022 7:15 AM, Hipreme wrote:
>> My project seems to be crashing DMD sometimes on its compilation. Would be nice to have a DMD debug build for distribution, it attempts to call JIT Debugger for dmd.exe right before it starts linking. I'm using Windows 10.
>
> If you can reduce the test case that causes dmd to crash, we can fix it. Please report it to bugzilla!

I found out what it was:

-preview=dip1021 is making my project crash: https://issues.dlang.org/show_bug.cgi?id=23484
Just opened the issue