D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3976 - segfault on anonymous struct/union
Summary: segfault on anonymous struct/union
Status: RESOLVED DUPLICATE of issue 4543
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-03-16 12:24 UTC by Ellery Newcomer
Modified: 2014-02-15 02:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ellery Newcomer 2010-03-16 12:24:31 UTC
struct A{
    struct{
        B b;
        C c;
    }
}
struct B{
    int i;
}
struct C{
    int j;
}

and DMD bombs out. Seems to be a forward referencing problem, as the AnonDeclaration's scope never gets set.
Comment 1 Ellery Newcomer 2010-03-16 17:35:57 UTC
Okay, for some reason my test case doesn't seem to be working. I'm sure it was earlier, but I deleted the file, etc. 

I can still get the segfault with my original (humongous) code, as well as a few others if the structs are rearranged a little. But I'm not whittling it down again.

Here it is if anyone cares:

http://personal.utulsa.edu/~ellery-newcomer/dxl.zip

unzip it and run dmd @kmd.

the problem file is src/dxl/read/biff/FilePassRecord.d
Comment 2 Don 2010-08-25 12:41:29 UTC
This is probably the same as bug 4543, which has a reduced test case.
Comment 3 Don 2010-08-26 07:40:22 UTC
(In reply to comment #1)
> Okay, for some reason my test case doesn't seem to be working. I'm sure it was
> earlier, but I deleted the file, etc. 
> 
> Here it is if anyone cares:
> 
> http://personal.utulsa.edu/~ellery-newcomer/dxl.zip
> 
> unzip it and run dmd @kmd.

There is no kmd file. Also this code seems to use Tango (dunno which version!). So it's not a usable test case. But I'm pretty sure this is the same as 4543.
Reopen if you think it is not the same, and have some kind of usable test case.

*** This issue has been marked as a duplicate of issue 4543 ***
Comment 4 Ellery Newcomer 2010-08-26 14:25:04 UTC
(In reply to comment #3) 
> 
> There is no kmd file. Also this code seems to use Tango (dunno which version!).
> So it's not a usable test case. But I'm pretty sure this is the same as 4543.
> Reopen if you think it is not the same, and have some kind of usable test case.
> 
> *** This issue has been marked as a duplicate of issue 4543 ***

I have little to no recollection of filing this isssue (and I agree it's pretty bad), but I don't think issue 4543 sounds like what this one was. I'll try digging things up this weekend. Sorry to waste your time, Don.
Comment 5 Ellery Newcomer 2010-08-28 21:12:59 UTC
(In reply to comment #4)
> (In reply to comment #3) 
> > 
> > There is no kmd file. Also this code seems to use Tango (dunno which version!).
> > So it's not a usable test case. But I'm pretty sure this is the same as 4543.
> > Reopen if you think it is not the same, and have some kind of usable test case.
> > 
> > *** This issue has been marked as a duplicate of issue 4543 ***
> 
> I have little to no recollection of filing this isssue (and I agree it's pretty
> bad), but I don't think issue 4543 sounds like what this one was. I'll try
> digging things up this weekend. Sorry to waste your time, Don.

Rats. It looks like dxl.zip has been overwritten since I reported this. I guess we'll never know..