What is SEGV_MAPERR?

What is SEGV_MAPERR , why does he always come up with SIGSEGV ?

+54
linux posix coredump core sigsegv
Jun 16 '09 at 7:29
source share
2 answers

This is a segmentation error. Most likely, the problem with the dangling pointer or buffer overflow.

SIGSSEGV is a signal that completes it based on a problem, segmentation error.

Check for broken pointers as well as an overflow problem.

Enabling core dumps will help you identify the problem.

+34
Jun 16 '09 at 7:33
source share

There are two common types of SEGV , which is an error caused by invalid memory access:

  • Access to a page that had the wrong permissions. For example, it was read-only, but your code tried to write to it. This will be reported as SEGV_ACCERR .
  • Access to a page that does not even appear in the application address space. This often results from dereferencing a null pointer or a pointer that has been corrupted by a small integer value. This is reported as SEGV_MAPERR .

The sorting documentation (indexed Linux source code) for SEGV_MAPERR is here: http://lxr.free-electrons.com/ident?i=SEGV_MAPERR .

+114
Jan 23 '15 at 18:36
source share



All Articles