Making Debug run faster.
#6
Actually if you manage to remove the extra space in Debug, and it'll crash, you probably get some useless information from it anyway.

It would probably crash due to the effects of writing outside array bounds instead of the actual writing outside bounds. These effect can possibly be noticed only after an hour of the overwriting.

You see, you might have two arrays
Code:
int Array1[256];
int* Array2[64];

The first array is a list of integers, the second is a list of pointers to integers. Now if you do this it would probably overwrite Array2:
Code:
for( int i = 0; i < 64; ++i ) // Inside bounds of both Array1 and Array2
  Array2[i] = &Array1[i]; // Maps Array1 values to Array2
for( int i = 0; i < 256+64; ++i ) // This goes out of bounds of Array1 and randomize the entire Array2
  Array1[i] = rand();
Probably no crash so far!
But an hour later you're doing this.
Code:
for( int i = 0; i < 64; ++i )
  Array2[i] += 100;  // CRASH!

The point where it crashes still doesn't give you any indication about what happened to Array2
Reply
Thanks given by:


Messages In This Thread
Making Debug run faster. - by ThuGie - 03-06-2012, 10:28 PM
RE: Making Debug run faster. - by FakeTruth - 03-06-2012, 11:09 PM
RE: Making Debug run faster. - by xoft - 03-06-2012, 11:19 PM
RE: Making Debug run faster. - by ThuGie - 03-06-2012, 11:49 PM
RE: Making Debug run faster. - by xoft - 03-07-2012, 02:23 AM
RE: Making Debug run faster. - by FakeTruth - 03-07-2012, 06:19 AM
RE: Making Debug run faster. - by FakeTruth - 03-07-2012, 06:45 AM
RE: Making Debug run faster. - by FakeTruth - 03-07-2012, 06:47 AM
RE: Making Debug run faster. - by xoft - 03-07-2012, 05:17 PM
RE: Making Debug run faster. - by xoft - 03-08-2012, 11:44 PM
RE: Making Debug run faster. - by ThuGie - 03-14-2012, 08:18 AM
RE: Making Debug run faster. - by xoft - 03-14-2012, 06:10 PM
RE: Making Debug run faster. - by xoft - 03-15-2012, 05:40 PM
RE: Making Debug run faster. - by ThuGie - 03-15-2012, 06:49 PM
RE: Making Debug run faster. - by xoft - 03-15-2012, 11:57 PM
RE: Making Debug run faster. - by xoft - 03-16-2012, 05:12 AM
RE: Making Debug run faster. - by xoft - 03-16-2012, 06:03 PM



Users browsing this thread: 2 Guest(s)