|Divide by zero detection email@example.com (news.club-internet.fr) (2007-09-18)|
|Re: Divide by zero detection DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-09-20)|
|Re: Divide by zero detection alexc@TheWorld.com (Alex Colvin) (2007-09-21)|
|Re: Divide by zero detection firstname.lastname@example.org (George Neuner) (2007-09-22)|
|Re: Divide by zero detection email@example.com (Gene) (2007-09-24)|
|From:||George Neuner <firstname.lastname@example.org>|
|Date:||Sat, 22 Sep 2007 13:08:33 -0400|
|References:||07-09-074 07-09-078 07-09-081|
|Posted-Date:||23 Sep 2007 18:58:46 EDT|
On Fri, 21 Sep 2007 02:02:31 +0000 (UTC), Alex Colvin
>>> I am looking for tools able to detect inside the source code,
>>> potential divide by zero errors.
>I think you're unlikely to find this in software, as it's one of the
>errors that is reliably and efficiently detected in hardware.
But the signal is not always caught by software. In languages with
optional handling the programmer can forget, and then there are those
languages in which it isn't even possible to catch the signal.
Depending on the local coding practices, the most workable idea is
probably the one Hans-Peter advanced: survey the source for divisions
that don't appear to handle the condition. The survey would only
produce a list of "probables" to be examined manually rather than a
list of definite bugs to be fixed. There are many ways a problem
division might be avoided altogether and frequently there are also
multiple ways to catch and handle the condition.
Return to the
Search the comp.compilers archives again.