Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:40:15+00:00 2026-06-05T16:40:15+00:00

More than one time I have encountered the following problem when building code with

  • 0

More than one time I have encountered the following problem when building code with g++:

Everything seems fine. You compile, run and then boom – a segfault jumps at you out of nowhere. You start looking at the code, can’t find anything, do make clean && make and the problem goes away.

I have seen this happen with different g++ version, different machines, different kernels.

Why does this happen? Is there a way to prevent it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:40:16+00:00Added an answer on June 5, 2026 at 4:40 pm

    If you change the header files, then there is no mechanism in the Makefile to figure out which source files include these, and need to be recompiled. A problem you might be having is if header files A.h defines a class A, and you add or remove or rearrange members of A, the size of the class changes. The old size is still being used in some of the source files, however, and so you might end up with one of your source files over-allocating or under-allocating when you create an instance of your class, on the stack or on the heap. make clean forces the new information about the class to propogate as all the source files have to recompile.

    If you make significant changes to the header files, it’s probably safest to just do a full rebuild.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

first time use JTree. Just wondering is it possible to have more than one
I have a variable v that possibly appears more than one time consecutively in
Is it possible to detect if the visible map display more than one time
I have to call more than one webservice in one method each webservice is
i am adding more than one link button during runtime but they all have
In my application I am using mapkit. All the time I have more than
How can I use the option more than one time? for example the command
When more than one file is opened in vim in console(terminal) with tabnew we
Adding more than one child to a WPF StatusBar results in poor layout with
I need to show more than one report on a Page like Classic Report,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.