crash cause record

Uninitialized pointer on the visit will lead to crash!

Pointer initial copy is not NULL, it may be any value! Int float like uninitialized variables such basis is zero, it could be anywhere!

C language specification does not require pointer must be initialized, some compiler implements will give a warning, some directly compiled.
After defining the pointer can not be initialized, but in fact the pointer variable has a value of (a pointer variable that points to the local memory of the original value, the assumption is 0x1234).
But must be initialized before use, otherwise the operation contents 0x1234 spent this place, will be a problem, because you do not know the address as 0x1234, the place pointed to what it might be the system code segment, then your code system will hang out. Sometimes this place can work operations (most of the cases are in), but ran into other systems will go wrong, or accidentally wrote a boundary cases (possibly unintentional), so will be out problem

Guess you like

Origin www.cnblogs.com/lthuang/p/11429276.html