Thread overview
[Issue 17601] [REG2.075.0-b1] segmentation fault for dmd -deps
Jul 06, 2017
Vladimir Panteleev
Jul 07, 2017
Vladimir Panteleev
Jul 14, 2017
Martin Nowak
Aug 03, 2017
Martin Nowak
Aug 03, 2017
Martin Nowak
Aug 03, 2017
Martin Nowak
Aug 03, 2017
Martin Nowak
Aug 03, 2017
Martin Nowak
Nov 22, 2019
Basile-z
Mar 21, 2020
Basile-z
July 06, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Reducing.

--
July 07, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Reduced:

//////////// a.d ////////////
import b;
//////////// b.d ////////////
void foo() {
    import c;
}
//////////// c.d ////////////
struct {
    void ()
}
////////// build.sh /////////
dmd -c -deps a.d -of/dev/null
/////////////////////////////

Bisection points to https://github.com/dlang/dmd/pull/6748 but it's more likely that that change simply exposed a latent bug.

--
July 14, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
                 CC|                            |code@dawg.eu
           Hardware|x86_64                      |All

--- Comment #3 from Martin Nowak <code@dawg.eu> ---
We'll address this with 2.075.1 to not delay the release even further.

--
August 03, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

--- Comment #4 from Martin Nowak <code@dawg.eu> ---
The reduced case segfaults on invalid code, seems to be different from the reported issue.

--
August 03, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

--- Comment #5 from Martin Nowak <code@dawg.eu> ---
@Mario, try to avoid external dependencies in bug reports, but if you include them, please use a fixed commit/tag, so we can reproduce the issue.

--
August 03, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

--- Comment #6 from Martin Nowak <code@dawg.eu> ---
Happens because a function ends up in the glue layer in PASSsemantic2 state
(std.range.SortedRange!(string[], "a < b").SortedRange.__xopEquals).
It's a side-effect of bluntly trying to run semantic3 on all imported modules
(https://github.com/dlang/dmd/pull/6748).
Seems like the deferred STCinference mechanism added in
https://github.com/dlang/dmd/pull/5075 isn't run for the compiler generated
__x* methods.

--
August 03, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

--- Comment #7 from Martin Nowak <code@dawg.eu> ---
I'd say that the change in https://github.com/dlang/dmd/pull/6748 and using -deps without -o- are suboptimal, as you'd end up with all the codegen from the semantic3 in imported methods in your object files, not particularly nice. This is unfortunately similar to how inlining is implemented in dmd :/.

--
August 03, 2017
https://issues.dlang.org/show_bug.cgi?id=17601

Martin Nowak <code@dawg.eu> changed:

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

--
November 22, 2019
https://issues.dlang.org/show_bug.cgi?id=17601

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=17601

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

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

--