Mailinglist Archive: opensuse-programming (98 mails)

< Previous Next >
Re: [suse-programming-e] Code produces different results
  • From: "William A. Mahaffey III" <wam@xxxxxxxxxx>
  • Date: Tue, 03 May 2005 17:12:13 -0500
  • Message-id: <4277F73D.3090908@xxxxxxxxxx>
Jerry Feldman wrote:

On Tuesday 03 May 2005 9:40 am, Davi de Castro Reis wrote:

Also, you don't mention if you are doing integer or floating point
math, and what language the code war written in. But, I still would
suspect that the code has a latent bug.

I could bet that this is the problem. There are other possibilities, but
this is the most probable cause.

I think the easiest way to find this kind of errors is to run your code
with some emulator or anything that changes the "memory layout". First
step, use valgrind ( Then try electric
fence and similar tools. This should solve the problem. If it doesn't,
well, debug the code in all machines until you get what is wrong.

One of the best tools available is IBM Rational's Purify Plus. While valgrind and and electric fence are also good tools, Purify still beats them hands down.

Purify is commercial, no ? (no problem with that, just checking :-) )

William A. Mahaffey III
Remember, ignorance is bliss, but
willful ignorance is LIBERALISM !!!!

< Previous Next >