Re: How to develop a random number generation device



Static analysis tools can only find some bugs. Some code has to be
stepped through to see if it ever gets stuck or goes into a loop. I'm
thinking of things like:

while (X > 1) do
if (X is even) X = X/2;
else X = 3 * X + 1;

It is really hard to see whether for some values of X this sticks in a
loop or not.

It didn't take me any time at all to see that this has no bounds checking;
what happens if someone passes X=1.42857 to it?

This little example-oid was clearly written by one of those lame
programmer-wannabees who keeps sniveling "All Software Has Bugs And
There's Nothing You Can Do About It!!!" as an excuse for his
incompetence/laziness.

Cheers!
Rich

.



Relevant Pages

  • Re: locked thread - how to investigate?
    ... With truss is there any way to focus on a ... the threads are being consumed which causes more consumption of the ... Perhaps you mean a thread stuck in a CPU loop? ...
    (comp.unix.solaris)
  • Re: Error Handling not Working ASP.NET
    ... Your code could easily get stuck in a loop in the error handler... ... any unhandled exception goes to Application_Error, ...
    (microsoft.public.dotnet.framework.aspnet)
  • problem with xp-tablet dotnet application
    ... compact-part). ... When I put a messagebox to see where ge gets stuck the dialog appears ... I looks like he gets into a wait loop in the onPaint ... but I don't have a onPaint handler in that Form. ...
    (microsoft.public.dotnet.languages.csharp)
  • shut down
    ... comes up saying I am stuck in a continious (excuse ... spelling) loop and tells me the problem is in nv4_disp. ...
    (microsoft.public.windowsxp.hardware)
  • Re: help: why dosent this code work?
    ... > infinite loop:( ... it is stuck waiting on a semaphore that I never saw anyone signal. ... And that appears to be an infinite busy loop. ... Go and debug your code - first find where you are stuck. ...
    (comp.os.linux.misc)