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
--
Bart Smaalders Solaris Kernel Performance
[EMAIL PROTECTED] http://blogs.sun.com/barts
_______________________________________________
opensolaris-discuss mailing list
[email protected]