Thread overview
Re: Is this a bug?
Sep 13, 2011
Jonathan M Davis
Sep 13, 2011
Caligo
Sep 13, 2011
Jonathan M Davis
Sep 13, 2011
Jonathan M Davis
Sep 13, 2011
Caligo
Sep 13, 2011
Jonathan M Davis
Sep 14, 2011
Caligo
September 13, 2011
On Monday, September 12, 2011 22:31:33 Caligo wrote:
> Trying to help someone on SO, I ran into problems.
> 
> On a 64-bit Linux machine, with DMD 2.055
> 
> This gives: '/Internal error: ../ztc/cg87.c 202'
> void main(){
> 
> auto f = (double m){ static double sum = 0.0; return sum += m * m; };
> double[] a = array(map!f(iota(1.0, 25.0, 1.0)));
> writeln(a);
> }
> 
> 
> This one compiles but I get Segmentation fault.
> void main(){
> 
> auto f = (double m){ /* static double sum = 0.0;*/ return m * m; };
> double[] a = array(map!f(iota(1.0, 25.0, 1.0)));
> writeln(a);
> }
> 
> 
> This one compiles and runs.
> void main(){
> 
> auto f = (double m){ /* static double sum = 0.0;*/ return m * m; };
> double[] a = array(map!f(array(iota(1.0, 25.0, 1.0))));
> writeln(a);
> //works
> }
> 
> 
> Putting everything together, I still get 'Internal error: ../ztc/cg87.c 202'
> with this one.
> void main(){
> 
> auto f = (double m){ static double sum = 0.0; return sum += m * m; };
> double[] a = array(map!f(array(iota(1.0, 25.0, 1.0))));
> writeln(a);
> }

It's always a bug if you see "Internal error."

- Jonathan M Davis
September 13, 2011
Great. So is it a known bug?

On Mon, Sep 12, 2011 at 10:35 PM, Jonathan M Davis <jmdavisProg@gmx.com>wrote:

> On Monday, September 12, 2011 22:31:33 Caligo wrote:
> > Trying to help someone on SO, I ran into problems.
> >
> > On a 64-bit Linux machine, with DMD 2.055
> >
> > This gives: '/Internal error: ../ztc/cg87.c 202'
> > void main(){
> >
> > auto f = (double m){ static double sum = 0.0; return sum += m * m; };
> > double[] a = array(map!f(iota(1.0, 25.0, 1.0)));
> > writeln(a);
> > }
> >
> >
> > This one compiles but I get Segmentation fault.
> > void main(){
> >
> > auto f = (double m){ /* static double sum = 0.0;*/ return m * m; };
> > double[] a = array(map!f(iota(1.0, 25.0, 1.0)));
> > writeln(a);
> > }
> >
> >
> > This one compiles and runs.
> > void main(){
> >
> > auto f = (double m){ /* static double sum = 0.0;*/ return m * m; };
> > double[] a = array(map!f(array(iota(1.0, 25.0, 1.0))));
> > writeln(a);
> > //works
> > }
> >
> >
> > Putting everything together, I still get 'Internal error: ../ztc/cg87.c
> 202'
> > with this one.
> > void main(){
> >
> > auto f = (double m){ static double sum = 0.0; return sum += m * m; };
> > double[] a = array(map!f(array(iota(1.0, 25.0, 1.0))));
> > writeln(a);
> > }
>
> It's always a bug if you see "Internal error."
>
> - Jonathan M Davis
>


September 13, 2011
On Monday, September 12, 2011 22:38:25 Caligo wrote:
> Great. So is it a known bug?

I don't know. You'd have to search bugzilla: d.puremagic.com/issues

- Jonathan M Davis
September 13, 2011
On Monday, September 12, 2011 23:15:19 Caligo wrote:
> On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
<jmdavisProg@gmx.com>wrote:
> > On Monday, September 12, 2011 22:38:25 Caligo wrote:
> > > Great. So is it a known bug?
> > 
> > I don't know. You'd have to search bugzilla: d.puremagic.com/issues
> > 
> > - Jonathan M Davis
> 
> Searching bugzilla (horrible technology) is never fun for me, thx.

Most search technology sucks on some level. But regardless, if bugs aren't reported, then they're not likely to be fixed. So, if you want to ensure that the bugs that you find get fixed, you need to report them, which for better or worse means using bugzilla.

- Jonathan M Davis
September 13, 2011
On Tue, Sep 13, 2011 at 4:47 AM, Jonathan M Davis <jmdavisProg@gmx.com>wrote:

> On Monday, September 12, 2011 23:15:19 Caligo wrote:
> > On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
> <jmdavisProg@gmx.com>wrote:
> > > On Monday, September 12, 2011 22:38:25 Caligo wrote:
> > > > Great. So is it a known bug?
> > >
> > > I don't know. You'd have to search bugzilla: d.puremagic.com/issues
> > >
> > > - Jonathan M Davis
> >
> > Searching bugzilla (horrible technology) is never fun for me, thx.
>
> Most search technology sucks on some level. But regardless, if bugs aren't
> reported, then they're not likely to be fixed. So, if you want to ensure
> that
> the bugs that you find get fixed, you need to report them, which for better
> or
> worse means using bugzilla.
>
> - Jonathan M Davis
>

*sigh*
I think you fail to understand my situation.

I don't know anything about D's internals and I know nothing about compilers and how they work.  If I did, I wouldn't ask on digitalmars.D.learn.  But, I'll go ahead and bug report this.

http://d.puremagic.com/issues/show_bug.cgi?id=6665


September 13, 2011
On Tuesday, September 13, 2011 15:34 Caligo wrote:
> On Tue, Sep 13, 2011 at 4:47 AM, Jonathan M Davis
<jmdavisProg@gmx.com>wrote:
> > On Monday, September 12, 2011 23:15:19 Caligo wrote:
> > > On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
> > 
> > <jmdavisProg@gmx.com>wrote:
> > > > On Monday, September 12, 2011 22:38:25 Caligo wrote:
> > > > > Great. So is it a known bug?
> > > > 
> > > > I don't know. You'd have to search bugzilla: d.puremagic.com/issues
> > > > 
> > > > - Jonathan M Davis
> > > 
> > > Searching bugzilla (horrible technology) is never fun for me, thx.
> > 
> > Most search technology sucks on some level. But regardless, if bugs
> > aren't reported, then they're not likely to be fixed. So, if you want to
> > ensure that
> > the bugs that you find get fixed, you need to report them, which for
> > better or
> > worse means using bugzilla.
> > 
> > - Jonathan M Davis
> 
> *sigh*
> I think you fail to understand my situation.
> 
> I don't know anything about D's internals and I know nothing about compilers and how they work. If I did, I wouldn't ask on digitalmars.D.learn. But, I'll go ahead and bug report this.
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=6665

I don't know much about dmd's internals either. But given that you have an error that you can search for ('/Internal error: ../ztc/cg87.c 202'), it shouldn't be hard to at least see whether there's anything which is obviously the same. And if there isn't then, you report it. Understanding how dmd works isn't really necessary to reporting the bug, and worse case, you end up reporting a bug which has already been reported, which is better than the bug never getting reported.

Most bugs where the compiler gives an internal error or an assertion in the compiler gets triggered get fixed fairly quickly, and even if they don't, they're not the sort of bug that much of anyone outside of the dmd devs who is going to have any clue what's going on with the bug. So, it's probably not all that fruitful to inquire about that sort of bug on any of the newsgroups. For the most part, the dmd devs don't seem to pay attention to D.Learn, so even if they would recognize the issue, they wouldn't respond to it in D.Learn. The odds of them seeing it in D newsgroup are higher, but when it comes to bugs which are "internal errors" or assertions in the compiler, I'd suggest that you just do a cursory search in bugzilla and then report them.

Bugs which relate to the language's behavior are much more likely to be recognized by others in the newsgroups (including D.Learn), so asking about them can be fruitful, but internal compiler errors and assertions isn't the sort of thing that people outside of the dmd devs generally recognize.

- Jonathan M Davis
September 14, 2011
On Tue, Sep 13, 2011 at 6:22 PM, Jonathan M Davis <jmdavisProg@gmx.com>wrote:

> On Tuesday, September 13, 2011 15:34 Caligo wrote:
> > On Tue, Sep 13, 2011 at 4:47 AM, Jonathan M Davis
> <jmdavisProg@gmx.com>wrote:
> > > On Monday, September 12, 2011 23:15:19 Caligo wrote:
> > > > On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
> > >
> > > <jmdavisProg@gmx.com>wrote:
> > > > > On Monday, September 12, 2011 22:38:25 Caligo wrote:
> > > > > > Great. So is it a known bug?
> > > > >
> > > > > I don't know. You'd have to search bugzilla:
> d.puremagic.com/issues
> > > > >
> > > > > - Jonathan M Davis
> > > >
> > > > Searching bugzilla (horrible technology) is never fun for me, thx.
> > >
> > > Most search technology sucks on some level. But regardless, if bugs aren't reported, then they're not likely to be fixed. So, if you want
> to
> > > ensure that
> > > the bugs that you find get fixed, you need to report them, which for
> > > better or
> > > worse means using bugzilla.
> > >
> > > - Jonathan M Davis
> >
> > *sigh*
> > I think you fail to understand my situation.
> >
> > I don't know anything about D's internals and I know nothing about compilers and how they work. If I did, I wouldn't ask on digitalmars.D.learn. But, I'll go ahead and bug report this.
> >
> > http://d.puremagic.com/issues/show_bug.cgi?id=6665
>
> I don't know much about dmd's internals either. But given that you have an
> error that you can search for ('/Internal error: ../ztc/cg87.c 202'), it
> shouldn't be hard to at least see whether there's anything which is
> obviously
> the same. And if there isn't then, you report it. Understanding how dmd
> works
> isn't really necessary to reporting the bug, and worse case, you end up
> reporting a bug which has already been reported, which is better than the
> bug
> never getting reported.
>
> Most bugs where the compiler gives an internal error or an assertion in the
> compiler gets triggered get fixed fairly quickly, and even if they don't,
> they're not the sort of bug that much of anyone outside of the dmd devs who
> is
> going to have any clue what's going on with the bug. So, it's probably not
> all
> that fruitful to inquire about that sort of bug on any of the newsgroups.
> For
> the most part, the dmd devs don't seem to pay attention to D.Learn, so even
> if
> they would recognize the issue, they wouldn't respond to it in D.Learn. The
> odds of them seeing it in D newsgroup are higher, but when it comes to bugs
> which are "internal errors" or assertions in the compiler, I'd suggest that
> you just do a cursory search in bugzilla and then report them.
>
> Bugs which relate to the language's behavior are much more likely to be recognized by others in the newsgroups (including D.Learn), so asking about them can be fruitful, but internal compiler errors and assertions isn't the sort of thing that people outside of the dmd devs generally recognize.
>
> - Jonathan M Davis
>

Thanks for the explanation, Jonathan.  And yes, I did search for it and I got hundreds of results.  There is no way for someone like me to go through all that and figure out if it's a duplicate.  So, as I said, I've reported it.  Don has already responded to the bug, and it seems that it's Linux related as he can't reproduce it on Windows.