Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Bugs fixing-dangling pointer (http://www.go4expert.com/forums/bugs-fixing-dangling-pointer-t9057/)

karthick_24 26Feb2008 13:20

Bugs fixing-dangling pointer
 
Hi,
I find very difficult to fix the dangling pointer bug occurred in my new open source office application developed in C++ language. I need some information to resolve this bug?

tommy 11Mar2008 11:27

Coverity-Source code analysis
 
Hi,
Usually dangling pointers arises when an object is deleted or deallocated , without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory. As the system may reallocate the previously freed memory to another process, if the original program then dereferences the (now) dangling pointer, unpredictable behavior may result, as the memory may now contain completely different data. This is especially the case if the program writes data to memory pointed by a dangling pointer, as silent corruption of unrelated data may result, leading to subtle bugs that can be extremely difficult to find, or cause segmentation faults. You didnít mention the code for resolving the bug.

shabbir 11Mar2008 13:52

Re: Bugs fixing-dangling pointer
 
No self promotion in posts. Please use the signature for that.


All times are GMT +5.5. The time now is 23:50.