core-dumped
Hello,
I have question about core-dump. for eample in simple C code i am declaring a pointer but it doesnt have any pointe ( no address has been pointed to the pointer) in that case if i dereference the pointer variable i will get code-dump. In simple C code we can find the place where is core-dump and which line code-dumped but incase of bigger projects and all, how to find these kind of dereference of unallocated pointers or not assigned a valid address to the pointer. Can anybody suggest how to find the pointer variables which is not allocated any valid address but it has been dereference some where in the code. Thanks in advance. Thanks, Dayalan |
Exactly the same way. You are able to find the point of code where it crashed. Then there's an action performed on some pointer. From that point it's easy.
On the other hand, it's much better to try to prevent such situations: when you declare a pointer, always set it to NULL and when you free() one, set it to NULL again. |
Quote:
|
All times are GMT -5. The time now is 04:19 PM. |