You must Sign In to post a response.
  • What are the probable reason of 'Segmentation fault (core dumped)' error during compilation of C?

    Want solve the "Segmentation Fault" error in C program? Unable to get through the Core Dumped error message? Check this Ask experts thread to get solutions to your problem.

    I am using Ubuntu 14.04 and running my C programs in g++ compiler. I am getting error while compiling the program written in C. The message says, "Segmentation fault(core dumped)". What are the probable reason behind this error? Please let me know how to rectify the issue.
  • Answers

    1 Answers found.
  • Though I am not an expert in C programing, thus is what I could gather from my sources -
    Segmentation fault occurs when a program tries to access a memory location that has no access to it or tries to access it in a non permitted way. Such fault ends the program, but generates a file known core dump. Core dump is actually a file when the status of the working memory of the computer is recorded when a program ends abruptly. It is used for debugging processes so that the reason for the abnormal activity can be assessed.
    Resort for the segmentation fault could never many fold. A few of them include -
    1. A buggy program or command.
    2. A faulty hardware/driver or memory.
    3. Overheating.
    4. Missing share lib or configuration files.
    Possible solutions could be -
    1. Installing and configuring proper hardware.
    2. Applying suitable patches to the program
    3. Using an updated system.
    4. Fixing the C program concerned for logical.errors.
    5. Analysing the Core dump file using any debugging tool.

    Please note that the issue can only fixed by analysing the individual cases. Try implementing the above solutions to check if they help.

    Live....and Let Live!

  • Sign In to post your comments