C Buffer Overflow - Why is there a constant number of bytes that trips a segfault? (Mac OS 10.8 64-bit, clang)
问题 I was experimenting with buffer overflow in C, and found an interesting quirk: For any given array size, there seems to be a set number of overflow bytes that can be written to memory before a SIGABRT crash. For example, in the code below the 10 byte array can be overflowed to 26 bytes before crashing at 27. Similarly, an array of 20 char s can be overflowed to 40 char s before it aborts on the 41st. Can anyone explain why this is? Also, is the SIGABRT the same as (or caused by) a