Windows’ kernel once tried to deal with gamma rays

Another great little story from The Old New Thing.

At one point, the following code was added to the part of the kernel that brings the system out of a low-power state:

        ;
        ; Invalidate the processor cache so that any stray gamma
        ; rays (I'm serious) that may have flipped cache bits
        ; while in S1 will be ignored.
        ;
        ; Honestly.  The processor manufacturer asked for this.
        ; I'm serious.
        ;
         invd

I’m not sure what the thinking here is. I mean, if the cache might have been zapped by a stray
gamma ray, then couldn’t RAM have been zapped by a stray gamma ray, too? Or is processor cache more susceptible to gamma rays than RAM? The person who wrote the comment seems to share my incredulity.

The invd was commented out a few weeks later, but the comment block remains in Windows’ kernel code to this day. Amazing.

41 Comments

  1. 2018-11-21 2:49 am
    • 2018-11-21 3:08 am
    • 2018-11-21 4:13 am
      • 2018-11-21 4:32 am
      • 2018-11-21 6:19 am
        • 2018-11-21 8:23 am
          • 2018-11-21 8:49 am
          • 2018-11-21 9:41 am
          • 2018-11-21 7:44 pm
    • 2018-11-21 7:53 pm
      • 2018-11-22 12:14 am
        • 2018-11-22 8:08 pm
  2. 2018-11-21 3:22 am
    • 2018-11-21 2:30 pm
      • 2018-11-21 3:32 pm
  3. 2018-11-21 3:30 am
  4. 2018-11-21 3:40 am
  5. 2018-11-21 9:35 am
  6. 2018-11-21 10:02 am
  7. 2018-11-21 10:49 am
    • 2018-11-21 1:03 pm
      • 2018-11-21 3:53 pm
        • 2018-11-21 5:01 pm
          • 2018-11-24 6:34 am
          • 2018-11-24 5:44 pm
          • 2018-11-24 8:02 pm
          • 2018-11-25 1:52 am
          • 2018-11-26 1:28 am
          • 2018-11-26 1:40 pm
          • 2018-11-28 11:59 pm
  8. 2018-11-21 11:10 am
    • 2018-11-21 1:06 pm
      • 2018-11-21 5:10 pm
        • 2018-11-22 10:35 am
  9. 2018-11-21 2:09 pm
  10. 2018-11-21 3:21 pm
  11. 2018-11-22 12:19 am
    • 2018-11-22 2:40 am
      • 2018-11-22 9:19 am
  12. 2018-11-23 5:43 am