Exception in GCC-compiled segmentation fault

Source: Internet
Author: User

Debug todayProgram, Add some new variables to the program, and other variables have not been moved.

When a program is run, the result is that an int * type epoch variable is changed to null, which is a newly added variable. After checking for two hours, we found that the problem was that epoch was not null during initialization, but it was very confusing to program null during running. No debugging result was returned.

Later, I accidentally make clean, deleted all *. O, compiled from scratch, and found that the problem was solved...

This may be because makefile is not well written and the dependency is incomplete. As a result, the. o file of previous versions is used in make, and the link becomes problematic.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.