Thread overview
[Issue 21321] Class with unimplemented interface method compiles, links, then segfaults, if inherited through abstract base class
May 01, 2021
Simon Naarmann
May 09, 2021
Adam D. Ruppe
Nov 13, 2022
Adam D. Ruppe
Jan 29, 2023
Nick Treleaven
Feb 02, 2023
Dlang Bot
[Issue 21321] Unimplemented interface method from abstract base class not detected
Feb 02, 2023
Nick Treleaven
May 01, 2021
https://issues.dlang.org/show_bug.cgi?id=21321

Simon Naarmann <eiderdaus@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Simon Naarmann <eiderdaus@gmail.com> ---
With DMD 2.096.0, the bug still manifests when generating both x86 and x64, both on Linux and on Windows 7.

--
May 01, 2021
https://issues.dlang.org/show_bug.cgi?id=21321

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moonlightsentinel@disroot.o
                   |                            |rg

--- Comment #2 from moonlightsentinel@disroot.org ---
Will probably be fixed by https://github.com/dlang/dmd/pull/12232

--
May 09, 2021
https://issues.dlang.org/show_bug.cgi?id=21321

Adam D. Ruppe <destructionator@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |destructionator@gmail.com
           Severity|major                       |regression

--- Comment #3 from Adam D. Ruppe <destructionator@gmail.com> ---
I just hit this again too.

---
interface A {
        void foo();
}

abstract class B(CRTP) : A { }

class C : B!C {}

void main() {
        auto c = new C;
        c.foo();
}
---

Appears to be introduced recently:

2.079.1 to 2.092.1: Failure with output:
-----
onlineapp.d(7): Error: class `onlineapp.C` interface function `void foo()` is
not implemented
onlineapp.d(7): Error: class `onlineapp.C` interface function `void foo()` is
not implemented
-----

Since      2.093.1: Failure with output: Error: program killed by signal 11



As such I'm upping the severity of this to regression.

--
May 09, 2021
https://issues.dlang.org/show_bug.cgi?id=21321

--- Comment #4 from moonlightsentinel@disroot.org ---
(In reply to Adam D. Ruppe from comment #3)
> As such I'm upping the severity of this to regression.

Regression introduced by https://github.com/dlang/dmd/pull/11191
(wow)

--
March 11, 2022
https://issues.dlang.org/show_bug.cgi?id=21321

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |atila.neves@gmail.com

--- Comment #5 from moonlightsentinel@disroot.org ---
*** Issue 22869 has been marked as a duplicate of this issue. ***

--
November 13, 2022
https://issues.dlang.org/show_bug.cgi?id=21321

--- Comment #6 from Adam D. Ruppe <destructionator@gmail.com> ---
And I hit it AGAIN today because in the interface, I wrote the wrong return type and used the right type in the class. The compiler SHOULD have said "original one not implemented" and drew my attention to it. Instead, it just randomly crashed with a null vtable entry.

--
January 29, 2023
https://issues.dlang.org/show_bug.cgi?id=21321

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msnmancini@hotmail.com

--- Comment #7 from Nick Treleaven <nick@geany.org> ---
*** Issue 23653 has been marked as a duplicate of this issue. ***

--
February 02, 2023
https://issues.dlang.org/show_bug.cgi?id=21321

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

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

--- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ntrel updated dlang/dmd pull request #14853 "Fix 2525: check all parent interfaces for overriden methods" fixing this issue:

- Fix Issue 21321 - Unimplemented interface method from abstract base class

  Add test case.
  Note: unimplemented abstract method not detected.

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

--
February 02, 2023
https://issues.dlang.org/show_bug.cgi?id=21321

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org
            Summary|Class with unimplemented    |Unimplemented interface
                   |interface method compiles,  |method from abstract base
                   |links, then segfaults, if   |class not detected
                   |inherited through abstract  |
                   |base class                  |

--
September 04
https://issues.dlang.org/show_bug.cgi?id=21321

Sönke Ludwig <sludwig@outerproduct.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sludwig@outerproduct.org

--