Re: compiler bugs

Gene <gene.ressler@gmail.com>
Fri, 1 May 2009 12:24:56 -0700 (PDT)

          From comp.compilers

Related articles
[13 earlier articles]
Re: compiler bugs derek@knosof.co.uk (Derek M. Jones) (2009-04-29)
Re: compiler bugs gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-04-29)
Re: compiler bugs r3jjs@yahoo.com (Jeremy J Starcher) (2009-04-29)
Re: compiler bugs walter@bytecraft.com (Walter Banks) (2009-04-30)
Re: compiler bugs cfc@shell01.TheWorld.com (Chris F Clark) (2009-04-30)
Re: compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-01)
Re: compiler bugs gene.ressler@gmail.com (Gene) (2009-05-01)
Re: compiler bugs cdg@nullstone.com (Christopher Glaeser) (2009-05-04)
Re: compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-05)
Re: compiler bugs gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-05-05)
Re: compiler bugs gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-05-05)
Re: compiler bugs cdg@nullstone.com (Christopher Glaeser) (2009-05-06)
Re: compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-06)
[3 later articles]
| List of all articles for this month |

From: Gene <gene.ressler@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 1 May 2009 12:24:56 -0700 (PDT)
Organization: Compilers Central
References: 09-04-072
Keywords: errors
Posted-Date: 01 May 2009 19:23:29 EDT

On Apr 27, 8:42 am, Sid Touati <SidTou...@inria.fr> wrote:
> How can a simple programmer detect a bug in a compiler ? is there some
> well known verification techniques ?
>
> I am afraid that many bugs are hidden inside compiler activated with
> sophisticated optimisation options, and few people can detect them: when
> a user program does not work, we usually think that the problem comes
> from the program itself, not from the compiler nor from the processor.
>
> On the other hand, when a compilation flag is on and the program
> crashes, we usually think that the bug comes from the compiler not from
> the program...


This is an interesting question. Invariably compiler bugs are
discovered at the end of a long _program_ debugging process, when all
the possibilities for bad code have been eliminated.


In my experience, assuming code improvement passes are inherently
buggy is a bit dangerous. One of the 3 or 4 true compiler bugs I've
seen in too many years of code hacking occurred only with all code
improvement options _turned off_.


One moral is that when developing code, unless your debugging and
production build options are exactly alike, you should maintain and
test with both continuously. Don't test with the debugging build,
then think that you'll get away with making a final production build
and shipping. That way lay dragons.


Gene



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.