Summary: core.exception.OutOfMemoryError on dtor field test of
                    class-embedded struct
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD

--- Comment #0 from Andrej Mitrovic <> 2011-10-16 
20:37:24 PDT ---
struct Bar
    this(int x) {}

    uint _count;

        assert(this._count > 0);

class Foo
        bar = Bar(1);

    Bar bar;

void main()
    auto foo = new Foo();

$ dmd test.d && test.exe
$ core.exception.OutOfMemoryError

The "assert(this._count > 0);" triggers this exception. I can only recreate
this if "bar" is a field of class Foo, and not just a temporary inside Foo's
constructor or anywhere else.

I'm labeling this as critical since these checks are prevalent throughout the
CairoD library and this seems like some kind of memory corruption issue.

I've also had this bug appear and disappear based on the current path of
invocation of an executable, IOW sometimes an app would throw this exception on
exit if it was invoked on a directory UP from the current application
directory, while in all other cases the exception would not be thrown.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to