double free or corruption
-
glibc detected double free or corruptionIT/Linux C 2013. 6. 1.
double free or corruption 오류 중 쉽다고 생각했던 double free or corruption 문제의 원인을 찾는데 엄청난 시간이 걸림을 경험하고 나니, 다른 분들도 이런 경우를 고려해 봤으면 하는 바람에서 >글을 적는다. double free or corruption 오류는 메모리 오류로써 두가지 발생 케이스가 있다.passing the same address to free twice overrunning an allocated area before passing its address to free. 1번과 2번 모두 free라는 메모리 해제 시스템함수를 호출할 때 segfault가 발생합니다.이런 문제를 만나면 일단 free가 두 번되는 경우가 있는지를 빠르게 찾고, 그 다음부..