[Bug 273] Unexplained crash in generated binary

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Sun Oct 1 21:15:41 UTC 2017


https://bugzilla.gdcproject.org/show_bug.cgi?id=273

--- Comment #12 from Iain Buclaw <ibuclaw at gdcproject.org> ---
---
for (ClassDeclaration *bcd = cd; bcd; bcd = bcd->baseClass)
  {
    if (!bcd->members)
      continue;

──> for (size_t i = 0; i < cd->members->dim; i++)
      {
        Dsymbol *sm = (*cd->members)[i];
        if (sm->hasPointers ())
          goto Lhaspointers;
      }
  }
---

It was at this point when palm said hello to face.

First bad commit was: 8bffa3ab8857398ef800fccde153029d289b68fc

https://github.com/D-Programming-GDC/GDC/pull/371

This is actually a horribly horrific horridness of a regression.

Here's a minimal test case that fails in master:

---
void main()
{
    assert((Base.classinfo.m_flags & 2) == 0);    // OK
    assert((Derived.classinfo.m_flags & 2) == 0); // Fail
}

class Derived : Base { }

class Base
{
  Base[] children;
}
---

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the D.gnu mailing list