Thread overview
[Issue 24519] compiler segfault on single default constructor argument
Apr 24
Dennis
[Issue 24519] compiler segfault on default argument with slice operator []
Apr 24
Dennis
Apr 24
Dlang Bot
Apr 24
Dlang Bot
Apr 26
Dlang Bot
April 24
https://issues.dlang.org/show_bug.cgi?id=24519

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Dennis <dkorpel@live.nl> ---
The new code to resolve __FILE__ and __LINE__ in default arguments crashes when walking over a slice generated from a typesafe variadic function. Reduced example:

```
int buildPath(int[] paths...)
{
    return 0;
}

void f(int path = buildPath(1, 2))
{

}

void g()
{
    f();
}
```

--
April 24
https://issues.dlang.org/show_bug.cgi?id=24519

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|compiler segfault on single |compiler segfault on
                   |default constructor         |default argument with slice
                   |argument                    |operator []

--- Comment #2 from Dennis <dkorpel@live.nl> ---
It doesn't even require variadic arguments, it's just about the empty slice:

```
void f(string file = ""[])
{

}

void g()
{
    f();
}
```

--
April 24
https://issues.dlang.org/show_bug.cgi?id=24519

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dkorpel created dlang/dmd pull request #16408 "Fix Bugzilla 24519 - compiler segfault on default argument with slice…" fixing this issue:

- Fix Bugzilla 24519 - compiler segfault on default argument with slice operator []

https://github.com/dlang/dmd/pull/16408

--
April 24
https://issues.dlang.org/show_bug.cgi?id=24519

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #16408 "Fix Bugzilla 24519 - compiler segfault on default argument with slice…" was merged into stable:

- a652348f581e84a77e4f895f60ad834f288951b9 by Dennis Korpel:
  Fix Bugzilla 24519 - compiler segfault on default argument with slice
operator []

https://github.com/dlang/dmd/pull/16408

--
April 26
https://issues.dlang.org/show_bug.cgi?id=24519

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #16409 "merge stable" was merged into master:

- 6c501f3e5135602dbf0a8066fa3ff8bc6a4b90f6 by Dennis Korpel:
  Fix Bugzilla 24519 - compiler segfault on default argument with slice
operator []

https://github.com/dlang/dmd/pull/16409

--