[Issue 15755] New: DMD segfault upon alias on alias on __trait(getAttributes, ...)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 4 05:37:44 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15755

          Issue ID: 15755
           Summary: DMD segfault upon alias on alias on
                    __trait(getAttributes, ...)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: iamtakingiteasy at eientei.org

The following code segfaults dmd 2.070 on current master HEAD :
07217cc3e05d465dff8341cf90f7710b94e02070 :

--->3---
struct Foo {
    @(123)
    int a;
}

template Attributes(As...) {
    alias Attributes = As;
}

template getattribute(alias member, alias attrs =
Attributes!(__traits(getAttributes, member))) {
    alias getattribute = attrs;
}

void main() {
    getattribute!(__traits(getMember, Foo, "a"));
}
--->3---

Result: Compilation error  / Return code: 11 (Segmentation fault)

--


More information about the Digitalmars-d-bugs mailing list