While testing a C programming project I encountered this error:
realloc(): invalid pointer
I tried to find the cause of the problem using Valgrind. When when I ran the code in Valgrind, it got stuck in an infinite loop in a different part of my code, and it didn't detect the invalid pointer, so I didn't get the answers I was looking for.
I guess what I want to know is: has anyone else encountered this problem with Valgrind and what's going wrong? Why does Valgrind jump into this infinite loop but when I run the code myself I just get the error.
GDB did detect the error but the info it gave me wasn't enough to fix the error; that's why I want to fix this problem I'm having with Valgrind.