Could this code damage my processor?

前端 未结 7 701
有刺的猬
有刺的猬 2021-02-05 18:50

A friend sent me that code and alleges that it could damage the processor. Is that true?

void damage_processor() {
    while (true) {
        // Assembly code th         


        
7条回答
  •  时光说笑
    2021-02-05 19:54

    Maybe this code causes your processor/system to lock up but there is no chance that it damages it permanently.

    Imagine if this were true: it would immediately be used by viruses/trojans to attack computers or hide their activity after detection.

    Even in the case that any code could damage a processor, the processor manufacturer could issue a so called microcode-update which is something like a soft-fix for the processor. Such microcode-updates are provided by operating systems and/or BIOS (and processor manufacturers) and are loaded into the processor before such code could be executed.

    To sum it up: No, your friend is wrong, assuming we're talking about x86/x64 platforms.

提交回复
热议问题