티스토리 뷰

왜 null 을 건드리면 세그먼트 폴트가 나는가..

Because a very common program error is a null pointer dereference (a read or write through a null pointer, used in C to mean "pointer to no object" and as an error indicator), most operating systems map the null pointer's address such that accessing it causes a segmentation fault.

http://en.wikipedia.org/wiki/Segmentation_fault

you’re welcome to declare that NULL should be a valid address in your application. We refer to this as “mapping” the NULL page, because you’re declaring that that area of memory should map to some piece of physical memory.

http://blog.ksplice.com/2010/03/null-pointers-part-i/
http://blog.ksplice.com/2010/04/exploiting-kernel-null-dereferences/

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함