On Thu, 30 Aug 2001 13:42:05 +1000, Stephen Robert Norris <srn@xxxxxxxxx> said: >I'd be interested to know how to avoid that. I'm pretty sure I can >construct a scenario (with multiple threads and memory mapping, for >example) where it's impossible to tell until you get the SEGV. For >instance, I memory map a file, pass a pointer into the mapped region >into the library and then unmap it some time later from another >thread. >Even if the library were checking (and I'm not sure how it could) >that the pointer points to valid address space, there will be a time >gap between the check and the use, and my unmapping can get in there. >Having the library install its' own signal handler is not an >acceptable solution, either. Sounds like a fundamental problem with the UNIX environment design, then. Kelly