[m-rev.] for review: deep profiling fixes, determinism algorithm change
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed Aug 14 13:41:53 AEST 2002
On 13-Aug-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> There should be a comment explaining what this function is supposed to do.
>
> That's 60 lines of low-level C code. Since defect rates for low-level
> C code are so high, so you should probably expect it to have on average
> at least six defects ;-) I can see a couple of them: it uses `int'
> when it should be using `unsigned long', and it doesn't check for
> overflow.
Whether something is a bug depends on the requirements. In this case, the
requirement is satisfied by any code that helps me to track down the bugs
I am looking for. The code I had there did that. I assure you I had and have
no intention of supplying parameter values that would cause overflow in an int.
> But I'm worried about the other four ;-).
Why? Any bugs in this code won't bite anybody who doesn't do low-level
debugging of LLDS code, and even then the bug will be obvious: either
too much debugging output or too little.
> It would probably be clearer to write this code using sscanf().
Thanks, I will. I didn't know about %n; it didn't exist when I learned
about scanf :-(
I will post a relative diff later today.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list