Dangling pointer
A hanging pointer (English dangling pointer) referred to in the computer science a pointer that contains an invalid value and thus refers to a nonexistent or not the pointer assigned storage area.
Hanging pointers often come thus concluded that they have been initialized (in the case alternatively called wild pointers ) - but also by the fact that they refer to a memory area that has already been freed.
Hanging pointers for the program run in unpredictable behavior and cause the program to crash. While userspace programs usually at a dereference of a wild pointer ended, such a kernel or at worst damage the modules, the entire system without the user noticing something before it is too late, because no supervisory authority exists, which could prevent, for example, the overwriting of foreign code. Therefore, please pay particular attention to the correct use of the kernel and driver development.
The unpredictability stems from the fact that access to a pre- shared memory area is not necessarily immediately a runtime error ( access violation ) triggers, as between the memory release by the programmer and the actual release by the runtime system can still pass some time. Find in this ( unpredictable ) Meanwhile, another access to the shared memory instead ( line (*) in the example), it will not cause an error. Since this is not reproducible, these sporadic errors are particularly insidious.
Example
C
# include