Quote:
Originally Posted by Cultist
I googled around but most of what I could find said that segfaults are generally a memory issue.
|
That is not correct. Segfaults are almost certainly caused by bugs in software and very unlikely to indicate a hardware problem.
Quote:
I've noticed lately that I'll occasionally get a segfault while compiling on my computer.
|
I have seen that a few times myself and never pinned it down, but I did see a noticeable pattern.
Quote:
There's no noticeable pattern, just that every now and then a bit of software that I'm trying to compile will segfault on me, even software that I've compiled in the past.
|
I often run multiple copies of the compiler simultaneously, nearly filling physical ram and typically using a small amount of swap. I have seen rare random segfaults in gcc only when doing that. If there is a significant margin of free ram beyond what one or more copies of gcc need, then there is no segfault.
Since I always have lots of free swap space, I'm pretty sure there is no commit limit issue (no memory request from gcc is being rejected by the kernel).
Some programs detect system resource levels (such as physical ram) and adjust their internal algorithms (time space trade off alternatives) to make better use of available resources. A bug in such code would exactly fit the symptoms I saw. But I don't know whether gcc even includes such code. I certainly have not been able to pin down the details.
I also don't know whether the segfault you've seen is related to the one I've seen.
Quote:
Originally Posted by Valery Reznic
If on another machine with same hard drive compilation works sure it's hardware problem. But if it's a laptop I guess changing the parts is a bit of challenge
|
Same software working symptom free on another machine is still not much of an indication that the original problem was hardware. I think a software bug is still a more likely theory.
A program might take a different path based on any detail of the CPU or any resource level that the program cares to check. One path might hit the bug and another not.