This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Determining if an address is valid prior to using it.


Given an arbitrary address, is it possible to test and see if it is in
the process's address space ?

My current technique is to create a new thread, then access the memory
from that thread.  Then if it did not segfault i know the address was
valid.


Is there a better way to do this ?


thanks,
bud davis



"Buy the ticket, take the ride."
                   Hunter S. Thompson


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]