On Wed, Aug 29, 2001 at 09:38:45PM -0500, Kelly Martin wrote:
> On Thu, 30 Aug 2001 10:05:15 +1000, Stephen Robert Norris <[EMAIL PROTECTED]> said:
> >So it's the library's fault if I pass it a bad pointer and it causes
> >a SEGV?
> Yes.  
> Kelly

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

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.


Stephen Norris    [EMAIL PROTECTED]
Farrow Norris Pty Ltd   +61 417 243 239
Gimp-developer mailing list

Reply via email to