lkml.org 
[lkml]   [1998]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: -EFAULT on invalid pointer
On Tue, Oct 20, 1998 at 05:41:56AM +0200, MOLNAR Ingo wrote:

> no, it's a quality of implementation issue. Also it's a usability
> issue, bugs detected should be reported back to user-space. It's
> _not_ a valid excuse that if it's not defined explicitly in POSIX
> or that other OSs are less careful.

I don't disagree its a useful feature - but its behaves
inconsistently between different OSs and different versions of linux.

> Also, it can be used by user-space too, if a memory-management
> software (such as a C++ wrapped garbage collector or whatever)
> maps/unmaps certain areas of memory, the pointer could be invalid
> because say that page is marked read-only, but user-space has the
> right to detect this.

But... the behaviour isn't consistent right now, why should we expect
it to be in ther future?

We changed the semantics once already, they could change again,
writing applications based upon on set on undefined semantics sounds
a bit dodgey to me.


Anyhow... we can do the above, (non-portably) in user-space my mmap
PROT_NONE and pulling apart the stack frame we get in the segfault
signal handler.



-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.086 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site