Bug 20830 – Segfault for multiple duplicate interfaces

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-14T04:19:36Z
Last change time
2020-05-23T03:55:32Z
Keywords
pull
Assigned to
No Owner
Creator
kntroh

Comments

Comment #0 by kntroh — 2020-05-14T04:19:36Z
dmd 2.092.0 crashes during compilation this code: interface T() { } alias T!() A; alias T!() B; alias T!() C; //class D : A, B { } // OK, dmd 2.092.0 will print a compilation error and the exit code will be 1. class D : A, B, C { } // dmd 2.092.0 will be crash and the exit code will be -1073741819. Windows 8.1 Pro 64-bit: >dmd test.d test.d(7): Error: class test.D inherits from duplicate interface T >echo %ERRORLEVEL% -1073741819 Linux Mint 19 (Tara) 64-bit: $ dmd test.d test.d(8): Error: class test.D inherits from duplicate interface T Segmentation fault $
Comment #1 by moonlightsentinel — 2020-05-14T08:26:17Z
Reduced test case: ================================= interface T { } class D : T, T, T { } ================================= This is a regression from 2.066.0 Up to 2.065.0: Failure with output: ----- onlineapp.d(2): Error: class onlineapp.D inherits from duplicate interface T onlineapp.d(2): Error: class onlineapp.D inherits from duplicate interface T onlineapp.d(2): Error: class onlineapp.D inherits from duplicate interface T ----- 2.066.0 to 2.078.1: Segfault with output: onlineapp.d(2): Error: class onlineapp.D inherits from duplicate interface T Since 2.079.1: Segfault with output: onlineapp.d(2): Error: class `onlineapp.D` inherits from duplicate interface `T`
Comment #2 by dlang-bot — 2020-05-14T12:03:08Z
@MoonlightSentinel created dlang/dmd pull request #11142 "Fix Issue 20830 - Segfault for multiple duplicate interfaces" fixing this issue: - Fix Issue 20830 - Segfault for multiple duplicate interfaces https://github.com/dlang/dmd/pull/11142
Comment #3 by dlang-bot — 2020-05-23T03:55:32Z
dlang/dmd pull request #11142 "Fix Issue 20830 - Segfault for multiple duplicate interfaces" was merged into stable: - 6e0e5a9eb5e492a2e8fd3bce2ad660339a4f3e39 by MoonlightSentinel: Fix Issue 20830 - Segfault for multiple duplicate interfaces https://github.com/dlang/dmd/pull/11142