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
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:
Probably no crash so far!
But an hour later you're doing this.
The point where it crashes still doesn't give you any indication about what happened to Array2
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();
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