[Issue 14536] New: Calling destroy() on a on an extern(C++) class causes a segfault

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 2 05:50:04 PDT 2015


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

          Issue ID: 14536
           Summary: Calling destroy() on a on an extern(C++) class causes
                    a segfault
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: devw0rp at gmail.com

class Foo{}
extern(C++) class Bar{}

void main() {
    destroy(new Foo()); // Works fine
    destroy(new Bar()); // segfault!
}

Calling destroy() on a class marked extern(C++) will segfault. Either it should
work and not segfault, or trying to call destroy in this way should result in a
compile time error.

--


More information about the Digitalmars-d-bugs mailing list