Well, this "SEGMENTATION FAULT" error encountered me and my friends while doing network programming in C on a Linux platform.
Cause for this error : A segmentation fault occurs mainly when our code tries to access some memory location which it is not suppose to access.
For example :
[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged
Cause for this error : A segmentation fault occurs mainly when our code tries to access some memory location which it is not suppose to access.
For example :
- Working on a dangling pointer.
- Writing past the allocated area on heap.
- Operating on an array without boundary checks.
- Freeing a memory twice.
- Working on Returned address of a local variable
- Running out of memory(stack or heap)
So, avoid / debug above errors to get rid of this
[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged
No comments:
Write comments