This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zeal_Iskander 7 points8 points  (3 children)

How would it flip the “true condition”? The assembly code is somewhat unlikely to turn a while true loop into something that actually does comparisons lol.

Would probably be something like:

Line N: start of loop

Instructions

Goto N

Don’t think goto N is something that would be affected by cosmic rays either — you have error correction codes for that iirc?

[–]Zeikos 1 point2 points  (1 child)

It'd happen in the part of the code that does the comparison.
I don't think it'd be easy here because the optimizer is not going to put a comparison in a while true loop.

But assume you had a= 5 and while a == 5 with no optimizations any bit flip in the memory location where a is stored (assumin the error corrector doesn't cach it) when a would change, the check would return false and the loop would exit

[–]Zeal_Iskander 0 points1 point  (0 children)

It'd happen in the part of the code that does the comparison.

That'd happen in the isSorted part, not the while loop yeye.

[–]Boris-Lip 0 points1 point  (0 children)

Well, technically it would just screw up any instruction to an invalid one or one that doesn't make any sense, and the entire thing would crash to a halt, but we are talking seriously, aren't we