Differences between release and debug

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?

Thanks,

JC
 
Hi,

does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?

Reliance on content of uninitialized memory.

-cd
 
Hi,
does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?

For unmanaged code, the two main reasons for getting a different
behavior between release and debug versions are :

1/ The memory allocation mechanism. Unitialized or incorrectly
initiliazed pointers will be handled differently.

2/ Optimizations which are usually disabled in debug versions. For
example, my current project systematically crashes under Win9x when I
optimize for speed or size (I'm using VC6 for this one but the same
remarks apply). If I disable optimizations or use default optimization,
there's no problem. The same program runs fine in all cases under Win NT
+.

What differences are you observing?
 
I am seing exceptions thrown in release mode that do not
occur in debug mode.

The optimisation is critical as there is usually a factor
of 10 speed between release and debug. So my next question
is ...

Is there a compile flag in debug that will set all
uninitialised variable to invalid values and show where
the problem is ?

Thanks,


-----Original Message-----
Hi,
does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?

For unmanaged code, the two main reasons for getting a different
behavior between release and debug versions are :

1/ The memory allocation mechanism. Unitialized or incorrectly
initiliazed pointers will be handled differently.

2/ Optimizations which are usually disabled in debug versions. For
example, my current project systematically crashes under Win9x when I
optimize for speed or size (I'm using VC6 for this one but the same
remarks apply). If I disable optimizations or use default optimization,
there's no problem. The same program runs fine in all cases under Win NT
+.

What differences are you observing?

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.xx
(replace .xx with .fr when replying by e-mail)



.
 
Hi,
Is there a compile flag in debug that will set all
uninitialised variable to invalid values and show where
the problem is ?

Debug does this by default I think. Which version of VS are you using? Does
your app still crash when you vary the optimization settings? I had similar
sounding problems which simply vanished with VS 2003

Cheers

Doug Forster

I am seing exceptions thrown in release mode that do not
occur in debug mode.

The optimisation is critical as there is usually a factor
of 10 speed between release and debug. So my next question
is ...

Is there a compile flag in debug that will set all
uninitialised variable to invalid values and show where
the problem is ?

Thanks,


-----Original Message-----
Hi,
does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?

For unmanaged code, the two main reasons for getting a different
behavior between release and debug versions are :

1/ The memory allocation mechanism. Unitialized or incorrectly
initiliazed pointers will be handled differently.

2/ Optimizations which are usually disabled in debug versions. For
example, my current project systematically crashes under Win9x when I
optimize for speed or size (I'm using VC6 for this one but the same
remarks apply). If I disable optimizations or use default optimization,
there's no problem. The same program runs fine in all cases under Win NT
+.

What differences are you observing?

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.xx
(replace .xx with .fr when replying by e-mail)



.
 
Back
Top