Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Works in win 98, crashes on xp.

Author: macaroni

Date: 23:23:57 09/05/03

Go up one level in this thread


On September 05, 2003 at 22:20:19, Dann Corbit wrote:

>On September 05, 2003 at 20:14:30, macaroni wrote:
>>Thanks!
>>This may sound like a really dumb question. But what kind of things are 'bad
>>memory access'?
>
>One example:
>char fruit[5];
>strcpy(fruit, "apple"); // One byte past the end written to
>
>Another example:
>char *p;
>x = p[50000]; // Read a byte at offset 50,000 from a random number
>
>Another:
>int list[5];
>list[5] = 0; // No element number 5 since they go 0 to 4...


I found the bug. I had a global declaration of int x;   I then declared it as a
local variable in a function, i'm surprised my compiler didn't pick it up.
Cheers



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.