News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

why is the result different in debug and release mode?

Started by facat, April 15, 2011, 08:12:35 PM

Previous topic - Next topic

facat


facat

I compiled my project in my friend's computer. He has a AMD cpu. to my surprise, the result is right.
i'm using cpu I5, i think this has something to do with my cpu. maybe there is a complile bug on a I5 cpu computer?

oBFusCATed

The only way to be sure it is a compiler bug, is to check the assembly.
But I'm pretty sure you have a bug in you code, you just have to find it :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

facat

Quote from: oBFusCATed on April 16, 2011, 07:14:59 PM
The only way to be sure it is a compiler bug, is to check the assembly.
But I'm pretty sure you have a bug in you code, you just have to find it :)


code bug?then how can this explain that my project is normal in my vs2005 and in CB on my friend's AMD computer?

oBFusCATed

Sometimes a bug is revealed by a special combination of computer, gcc, moon phaze, etc.
Also is you computer stable?

btw, this is not C::B related, so please ask more questions on the mingw/gcc mailing list
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Jenna

Due to optimization you might have different memory boundaries in debug and release code also some functions might be inlined with, but not without optimization.
And there are many other possible other sources of trouble.

This might be the cause for your errors.

You have to be sure that your code works stable on any system, with any byte-order and on 32 and 64-bit.

You can try to add some debug-statements (cout's or printf's) to find the place where something goes wrong.