Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

There are two common kinds of SEGV , which is an error that results from an invalid memory access:

  • A page was accessed which had the wrong permissions. E.g., it was read-only but your code tried to write to it. This will be reported as SEGV_ACCERR .
  • A page was accessed that is not even mapped into the address space of the application at all. This will often result from dereferencing a null pointer or a pointer that was corrupted with a small integer value. This is reported as SEGV_MAPERR .
  • Documentation of a sort (indexed Linux source code) for SEGV_MAPERR is here: https://elixir.bootlin.com/linux/latest/A/ident/SEGV_MAPERR .

    Why is stackoverflow.com/a/1000010/358475 marked as the answer when this one is more complete and helpful? OldPeculier Apr 28, 2015 at 16:56 The question and other answer are much older than my answer. I did edit the other answer to improve it at least. ahcox Apr 28, 2015 at 18:25 It would be interesting to know the circumstances that differentiate these from EXC_BAD_ACCESS exception types. e.g. is the page mapped but not allocated (/ recently deallocated)? Bobjt Mar 1, 2016 at 21:05 There are even more SEGV types: elixir.free-electrons.com/linux/latest/source/include/uapi/… tomasz Oct 30, 2017 at 12:12

    It's a segmentation fault. Most probably a dangling pointer issue, or some sort of buffer overflow.

    SIGSSEGV is the signal that terminates it based on the issue, segmentation fault.

    Check for dangling pointers as well as the overflow issue.

    Enabling core dumps will help you determine the problem.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .