DMD Access Violation
ag0aep6g via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 26 11:49:58 PDT 2016
On 09/26/2016 08:07 PM, Jonathan Marler wrote:
> My dmd compiler gets an Access Violation when compiling this code:
>
> public template TemplateWrapper(T)
> {
> alias ToAlias = T;
Should probably be `alias TemplateWrapper = T;`.
> }
> public class Bar : Foo
> {
> TemplateWrapper!(Bar) something;
> }
> public class Foo
> {
> static class StaticClass : Bar { }
> }
With the change above, dmd 2.071.2 crashes with an assertion failure:
toobj.c:352: virtual void toObjFile(Dsymbol*,
bool)::ToObjFile::visit(ClassDeclaration*): Assertion `cd->structsize >=
8 || (cd->cpp && cd->structsize >= 4)' failed.
Current master dmd (04e6a6e) doesn't crash. Maybe the bug has already
been fixed.
Reminds me of this issue:
https://issues.dlang.org/show_bug.cgi?id=16273
Similar setup, but opposite results: crashes with master and works with
2.071.
More information about the Digitalmars-d
mailing list