Thread overview
[Issue 19465] dmd segfaults on endless mixin recursion
Dec 04, 2018
Stefan Koch
Dec 04, 2018
Dennis
Jun 30, 2019
Basile-z
Mar 21, 2020
Basile-z
Dec 17, 2022
Iain Buclaw
Dec 17, 2022
Iain Buclaw
December 04, 2018
https://issues.dlang.org/show_bug.cgi?id=19465

Stefan Koch <uplink.coder@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uplink.coder@gmail.com

--- Comment #1 from Stefan Koch <uplink.coder@gmail.com> ---
Hmm, I think if you are asking for a stack-overflow you should not be surprised if you get it.

This is one of these problems which you get by interpreting a turing-complete language at compile-time.

Introducing an artificial recursion limit has been done, but people (weka) had to increase it in their fork.

Checking for a limit is not _huge_ deal but it is work which does not have to be done.

--
December 04, 2018
https://issues.dlang.org/show_bug.cgi?id=19465

--- Comment #2 from Dennis <dkorpel@live.nl> ---
Yeah, I don't know if/how this should be "fixed", but notably endless recursion
in CTFE:
``
enum a = f();
int f() {return f();}
```
Results in:
Error: function `onlineapp.f` CTFE recursion limit exceeded

While endless recursion in mixin without __traits(compiles, ...):
```
enum string s = "mixin(s);";
mixin(s);
```
Results in, after a while:
Error: out of memory

--
June 30, 2019
https://issues.dlang.org/show_bug.cgi?id=19465

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |b2.temp@gmx.com

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=19465

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=19465

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=19465

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
           Severity|minor                       |major

--