DMD failed with exit code -1073741819

jmh530 john.michael.hall at gmail.com
Tue May 3 19:35:05 UTC 2022


On Tuesday, 3 May 2022 at 19:03:56 UTC, Dennis wrote:
> On Tuesday, 3 May 2022 at 18:22:49 UTC, jmh530 wrote:
>> Does anyone have any idea what causes these types of errors?
>
> Sounds like a stack overflow, maybe your code has a 
> complex/recursive part that makes DMD's call stack very deep.

Thanks. I think this was it. I figured it out, but it took a bit 
of time to identify where the problem was coming from...

Basically, I started out with a template like
```d
template foo(T, U u = val, V, W) {}
```
and refactored it to
```d
template foo(T, U u = val, V, W, U y = u) {}
```
which is when I started getting the problem, but I had changed a 
bunch of other stuff to introduce `y`, so it wasn't entirely 
clear why that would cause the problems.
Anyway, changing it to
```d
template foo(T, U u = val, V, W, U y = val) {}
```
made the problem went away.


More information about the Digitalmars-d-learn mailing list