更新时间:2021-10-13 21:23:20
分段错误是运行时错误,通常是由于引用无效的指针引起的.通常,无效指针从未被初始化过,但是有时它会重用旧指针或在已分配内存块的末尾(例如,在字符串末尾)进行写入.
A segmentation fault is a runtime error that is usually due to referencing an invalid pointer. Usually that invalid pointer has never been initialized, but sometimes it is reusing an old pointer or writing past the end of an allocated memory chunk (such as past the end of a string).