D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18970 - DMD segfault due to opDispatch
Summary: DMD segfault due to opDispatch
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-11 15:55 UTC by Luís Marques
Modified: 2020-11-16 15:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Luís Marques 2018-06-11 15:55:35 UTC
This crashes DMD:

struct S
{
    this(int)
    {
        this.yyy;
    }

    auto opDispatch(string name)()
    {
        alias T = typeof(x);
        static if(is(T.U)) {}
    }
}
Comment 1 Seb 2018-06-12 16:53:42 UTC
PR https://github.com/dlang/dmd/pull/8354
Comment 2 github-bugzilla 2018-06-19 07:20:39 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/80473094e3213868b00a9502265839f7e53856e9
Fix Issue 18970 - DMD segfault due to opDispatch

https://github.com/dlang/dmd/commit/42e7a143f9d83023fd7e55c16b2ecdbcdfea5d4a
Merge pull request #8354 from wilzbach/fix-18970

Fix Issue 18970 - DMD segfault due to opDispatch
Comment 3 Dlang Bot 2020-11-16 15:09:50 UTC
dlang/dmd pull request #11971 "[dmd-cxx] Backport fixes for Issue 18970 and 21164" was merged into dmd-cxx:

- 8a6d6b5945817134262387f3417be1d7d322df4b by Sebastian Wilzbach:
  Fix Issue 18970 - DMD segfault due to opDispatch

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