On Friday 27 October 2006 08:57, Bart Smaalders wrote:
> Eric Enright wrote:
> > On 10/26/06, Robert Lunnon <[EMAIL PROTECTED]> wrote:
> >> Can anyone give me an explanation of what exactly would cause a signal
> >> for
> >> Segmentation Violation - Page - Fault to be returned. The Memory region
> >> accessed was previously accessed successfully then suddenly causes a
> >> page fault. Is there a way to look at the page attributes of a memory
> >> region in
> >> mdb or gdb ?
> >
> > If it was accessed successfully and then not, there was probably a
> > free(3C) somewhere in between.. pmap(1) will print attributes for you.
> >
> > [EMAIL PROTECTED]:~ (1)> pmap $$
> > 6298:   /usr/bin/tcsh
> > 08038000      64K rw---    [ stack ]
> > 08050000     288K r-x--  /usr/bin/tcsh
> > 080A7000      28K rwx--  /usr/bin/tcsh
> > 080AE000     476K rwx--    [ heap ]
> > D0D70000      20K r-x--
> > /usr/lib/locale/en_CA.ISO8859-1/en_CA.ISO8859-1.so.3
> > [...]
> >
> > (can also operate on a core)
>
> Note that a free using the normal libc malloc will not
> cause the page to be unmapped, which is required to get
> a segv.
>
> If you mmap a file MAP_SHARED and someone ftruncates the
> file, this can happen.  It can also happen if your process
> simply unmaps the space itself.
>
> Pmap should indeed show the missing mapping.
>
> - Bart

mdb ::mappings dcmd shows the mapping exists OK, but I get a page fault 
accessiing it. Also both gdb and mdb misbehave with this app.  mdb segfaults 
when printing regs from a signal handler and gdb faults with an unrelated 
segv in the application. Since the problem is a wine application the memory 
is played with from a protection point of view.

Its almost like the pagetable is bad.

Bob
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to