Related articles |
---|
Re: Compiler bugs Peter-Lawrence.Montgomery@cwi.nl (2002-01-05) |
Re: Compiler bugs christian.bau@cbau.freeserve.co.uk (Christian Bau) (2002-01-05) |
Re: Compiler bugs chase@world.std.com (David Chase) (2002-01-14) |
compiler bugs SidTouati@inria.fr (Sid Touati) (2009-04-27) |
Re: compiler bugs DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-04-28) |
Re: compiler bugs r3jjs@yahoo.com (Jeremy J Starcher) (2009-04-28) |
Re: compiler bugs lkrupp@indra.com (Louis Krupp) (2009-04-28) |
Re: compiler bugs jonathan@nitrogen.astro.indiana.edu (Jonathan Thornburg) (2009-04-28) |
Re: compiler bugs jgd@cix.compulink.co.uk (2009-04-28) |
Re: compiler bugs georgeps@xmission.com (George Peter Staplin) (2009-04-28) |
Re: compiler bugs marcov@stack.nl (Marco van de Voort) (2009-04-29) |
[18 later articles] |
From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | Tue, 28 Apr 2009 11:56:16 +0200 |
Organization: | Compilers Central |
References: | 09-04-072 |
Keywords: | errors |
Posted-Date: | 28 Apr 2009 14:50:36 EDT |
Sid Touati schrieb:
> How can a simple programmer detect a bug in a compiler ? is there some
> well known verification techniques ?
The most general method:
Reduce the code, where you observed an possible compiler bug, until you
have a small program to reproduce the error. Then give that program to
the compiler writers.
The most sophisticated method:
Use an decompiler to re-create the source code from the executable, and
search for differences. A decompiler may find erroneous machine code
itself, when the code is not reducible to high-level statements and
expressions.
There exist many other methods in between, like inspecting the
disassembled source code for obvious errors. This is what a decompiler
will do automatically.
A simple method is using another compiler, or other optimization
options, to find out different behaviour of the executables. But this is
a weak method, sensitive to uninitialized variables, wild pokes and
other coding errors.
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.