Help! (Problems with the stack?)
Dion Hollenbeck
hollen at zeta.megatek.uucp
Thu Jul 13 01:37:29 AEST 1989
>From article <3943 at s.cc.purdue.edu>, by aic at s.cc.purdue.edu (George A. Basar):
> In article <2163 at wasatch.utah.edu>, u-tholly at wasatch.utah.edu (Troy Holly) writes:
>> CodeView debugger. I have a line of code that passes arguments to
>> the tanh() math function, but when I get there, all of the variables
>> in the calling routine become undefined, and I get an "M6101 invalid"
>> floating point error. This particular line of code is executed many
>
>
> Have you checked your memory model and the lib you are linking
> with to be sure they match? Could be that you are mixing models and the
> lib routine expects both selector:offset and you are only pushing offset
> or selector(incorrect one):offset (in the case where ds != ss)
As I replied to the original posting, I, too, started to suggest this,
but after re-reading the original and noting that "after executing
several times with no problems" the function call would fail, I
removed the comment about linking to the wrong libraries. If it
exhibited the failure behaviour on EVERY iteration, I would be inclined
to agree with George that improper linking was the culprit, but upon
re-reading the original posting, I don't think so. It is, however,
remotely possible that the function could be grabbing garbage data
from the wrong place time after time and just by chance it conforms
to some valid floating point number and therefore only fails some of
the time, but this is highly unlikely. The other question to pose
is: "Are your floating point results REASONABLE when the function
does not fail?"
Dion Hollenbeck (619) 455-5590 x2814
Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121
uunet!megatek!hollen or hollen at megatek.uucp
More information about the Comp.lang.c
mailing list