Luk frnd..
First of all.. U just cannt acess other PAS i.e.process address space via other process..
Ex--malloc some memory n then free it twice..
First tym it will b freed bt d nxt time u try to free it. U cant .. So it will report the illegal access to memory bcz now that adress is not in your pas..errors r handled by some compiler in a standard way..they may show some fixed area of memory when u try to access such areas of memory which are not allocated for ur process..
Ex.gcc may show you glibc or give a segvN
Since we know that we r having virtual memory management.. So how r u going back to that only address...
I tried to save the pointer value (obtained by malloc) by writing it in a file..n later on use it from that value. Bt
cant initiallise a pointer by giving an virtual address n printing from there ..(i tried it getting errors)..
Also..as soon as your first process is over...previous malloc'd address are mostly get corrupted bcz. Of the use by various other processes..On 11 Jan 2012 18:24, "夏业添" <summerxyt@xxxxxxxxx> wrote:_______________________________________________Hi,My tutor asked me to test whether one process leaves information in memory after it is dead. I tried to search some article about such thing on the Internet but there seems to be no one discuss about it. And after that, I tried to write some program in the User Mode to test it, using fork() to create lots of processes and filling char 'a' into a 102400 bytes char array in each process. Then I used malloc() to get some memory to seek char 'a' in a new one process or many new processes, but failed. All memory I malloced was full of zero.As the man page of malloc said:"The memory is not initialized", I believe that the memory which was got by malloc() could be used by other process, and therefor information leakage exists. But how can I test it? Or where can I get related information?Thanks!
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies