Yes, errors may occur in some non-zero probability, but are not likely to cause your program to reach the invalid condition check.
You may have alpha particles hitting some critical logic in your CPU or your memory at just the right moment to flip some bit (which may result in pretty much anything), or you could have some page swapped to a disk that has disfunctional segments. The exact rate at which this may occur depends on several things:
- The voltage levels your CPU uses - modern CPUs will have much lower levels to save power, mobile ones likely being some of the most sensitive at that. The lower the voltage, the lower the thresholds become, and it gets easier for some external force to flip the logical value.
- The environment in which you run - people designing CPUs for space shuttles, nuclear plants or even the CERN supercollider are probably working like hell to prevent this from happening, as these CPUs are probably constantly bombarded by radiation and seeing higher failure rates.
- Stress on the machine. A CPU working 24/7, is more likely to be hit.
- CPU area - servers with many cores are more likely to be hit, they simply pose a larger target.
- Built-in support for error detection and correction - most modern CPUs have ECC bits and parity checks in place for most of the sensitive HW areas. Single errors can usually be corrected, more complicated errors (several bits flipped) may be detected without the possibility to correct, but the HW would at least raise some fault or machine-check-error over this (so you won't even get to the error check in your code). For disk reliability you have another set of features of course, like RAID.
Note that some critical systems require higher level of reliability (banks, for e.g.), so they would likely buy CPUs offering better RAS features. Smartphones and tables are usually on the less critical part of the spectrum, but I guess you might see tables systems with some of this stuff.
Either way, any reasonable CPU today should have enough protection to capture most possible errors in high probability and fix in "under the hood", so you won't even know they existed. Complicated errors that can't be handled are still most likely to get caught, and would probably just cause your machine to hang or reboot. You can assume a simple program will have deterministic behavior with almost 100% probability.