[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Page Faults Defined

On Fri, Sep 27, 2002 at 05:41:29PM -0400, Joey Hess wrote:
> Will Newton wrote:
> > The idea of "least surprise". What is more suprising to a user, that the 
> > package name is different from upstream, or that the description is slightly 
> > at odds with the package name?
> > 
> > If anyone else finds this a cause for concern I will think about it, 
> > otherwise I will mark this notabug in a week.
> Why don't you just append something like this to the description:
>   Note: The "sigsegv" in this software's name is a misnomer; it handles
>   page faults and not segmentation faults.

But does it?  It handles SEGV signals, which are not sent for all
page faults.  The vast majority of page faults are used to load pages
on demand.  This includes code pages, freshly allocated pages, and pages
loaded back from swap space, and it occurs on a level that's not
visible to user processes.

The "segmentation" part of "segmentation fault" could be reinterpreted
to refer to "program segments" as defined by the ELF format.  You can
see them in /proc/1/maps, for example.  By extension, user-level mmap
is a way to dynamically create new segments.  Then accessing memory
that's not part of a segment is a "segmentation fault", and it's exactly
what libsigsegv handles.

(I have no idea if this is the actual derivation of the signal name,
or whether it's a holdover from segmented memory architectures.)

In conclusion, I think the package description is mistaken and adding
such a note would just make it more mistaken.

Richard Braakman

Reply to: