Thread overview
[Issue 23979] 2.104 segfaults
Jun 08, 2023
Dennis
Jun 08, 2023
Dennis
[Issue 23979] ICE on failed alias this attempt on pointer expression
Jun 08, 2023
Dennis
Jun 08, 2023
Dlang Bot
Jun 10, 2023
Dlang Bot
Jun 16, 2023
Dlang Bot
Jun 16, 2023
Dlang Bot
June 08, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl

--- Comment #1 from Dennis <dkorpel@live.nl> ---
The segfaults happens in:
```
ExpressionSemanticVisitor::visit(PtrExp*) (this=0x7fffffff69d8,
exp=0x7fffeb62d720) at src/dmd/expressionsem.d:7442
7442            Type tb = exp.e1.type.toBasetype();
(gdb) bt
#0  ExpressionSemanticVisitor::visit(PtrExp*) (this=0x7fffffff69d8,
exp=0x7fffeb62d720) at src/dmd/expressionsem.d:7442
#1  0x00005555559b66b6 in PtrExp::accept(Visitor*) (this=0x7fffeb62d720,
v=0x7fffffff69d8) at src/dmd/expression.d:5481
```

The PtrExp in question comes from this line:

source/mud/memory/smartpointers.d:179
```
assert(!__traits(compiles, *classPtr));
```

I'm looking into reducing it

--
June 08, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

--- Comment #2 from Dennis <dkorpel@live.nl> ---
Reduced to:
```D
class A {}

void h()
{
    const auto classPtr = SPtr.init;
    assert(!__traits(compiles, *classPtr));
}

struct SPtr
{
    A ptr() { return A.init; }
    alias ptr this;
}
```

--
June 08, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|2.104 segfaults             |ICE on failed alias this
                   |                            |attempt on pointer
                   |                            |expression
           Severity|major                       |regression

--
June 08, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

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 #15300 "Fix 23979 - ICE on failed alias this attempt on pointer expression" fixing this issue:

- Fix 23979 - ICE on failed alias this attempt on pointer expression

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

--
June 10, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

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 #15300 "Fix 23979 - ICE on failed alias this attempt on pointer expression" was merged into stable:

- 8e92e709dc1796c163fb979fa0a91783eeb8c902 by Dennis Korpel:
  Fix 23979 - ICE on failed alias this attempt on pointer expression

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

--
June 16, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

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

- 5e1833a279a8a72f0de0532530cfad832d3ed980 by Dennis:
  Fix 23979 - ICE on failed alias this attempt on pointer expression (#15300)

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

--
June 16, 2023
https://issues.dlang.org/show_bug.cgi?id=23979

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

- 5e1833a279a8a72f0de0532530cfad832d3ed980 by Dennis:
  Fix 23979 - ICE on failed alias this attempt on pointer expression (#15300)

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

--