Paramters of type float getting corrupted in Microsoft C 5.1. HELP !!!

H Bruce elee24 at castle.ed.ac.uk
Wed Oct 31 06:46:42 AEST 1990


I am having a problem with Microsoft C (V 5.1).

When I pass a parameter of type float (by value) to a function, by the time
it is read from the stack by the function it is corrupted.
The corrupted value is something very small (eg X.XXXXe-XXX) and varies
depending on the parameter.

The program comprises 2000 lines of code in 7 modules producing a 90K EXE file.
I am using the the large memory model.
When I extract the offending part of the program and run it independently,
the problem vanishes. 

This is happening in several functions. If I get around it by not passing
parameters the problem manifests itself somewhere else.
I have stack checking enabled.
I have allocated 8K for the stack and there is over 1K free.
(The stack size may sound a bit large but I pass some large structures as
paramters.)


Does anyone know what is is happening?
How can I look at the stack in codeview ?
How can I stop execution in codeview when the parameter is corrupted ?
(This would have to be at assembly level I think ...... yeeeuuuch)

Thanks in desperation,

Henry Bruce.



More information about the Comp.lang.c mailing list