Mail Archives: djgpp/1998/10/22/03:35:13
>Paul Byrne wrote:
>
>> I've been getting some unusual errors with a program I'm writing. I
>> was
>> writing temporary code to help test some new classes. I included the
>> following global variables ...
>> and everything worked fine. However, simply changing the order ...
>> causes problems. Everything compiles fine. Running produces a
>> SIGSEGV.
>
>You're going to have to give us more information. Where is it crashing?
>Have you debugged it?
>
>Likely you're overrunning a buffer, which, with the previous order, just
>happens to allow the pointer to hit the next buffer, and so doesn't
>cause a crash in one order, but does cause one in another.
I'm definitely going to have to stop coding late at night... :)
The error turned out to be in the class I was trying to test. A rather
silly error was causing it to recurse indefinitely while working its way
through memory from where it was supposed to be into my global arrays.
With the variables in one order, it was running into values which halted
the recursion. In the other case it simply ran out of stack space.
Thanks to all those that helped!
-paul
- Raw text -