Winfield Trail
Winfield Trail

Reputation: 5695

Occasionally after compiling, computer locks up

This is a strange issue, but it happens between one and five times a month.

During development, I compile frequently (this is not the unusual part.) From time to time, running the freshly-compiled binary locks up my system. Tray clock doesn't increment, ctrl+alt+backspace doesn't kill Xorg. Totally conked.

I physically powercycle the machine and everything's OK. Application runs fine, from the same binary that murdered my machine earlier or after a no-change recompile, and I get on with my work.

But it still bothers me, largely because I have no idea what causes it. This can occur with binaries compiling with either Clang or GCC. What is going on?

Upvotes: 0

Views: 92

Answers (1)

Dan L
Dan L

Reputation: 325

Hard to say, but I have two ideas:

1) Bad RAM This is possible, but depending on your code, #2 might be more likely.

2) Buffer overflow bug If you are overwriting memory due to a bug in your code, you could be putting some bits in memory that happen to be assembly instructions as well. I would look very carefully at the code you have to see where you don't check array lengths before you write to them.

Upvotes: 1

Related Questions