Could this code damage my processor?

前端 未结 7 773
有刺的猬
有刺的猬 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:39

    I heard rumor of a bug in the Pentium I that when given a certain nonsensical series of instructions in a tight loop would burn up a single flip-flop so fast the thermal protection couldn't protect it.

    What I found reference for once was really old CPUs could be cooked by doing this in real mode:

    halt:
        jmp short halt
    

    The correct code was

    halt:
        nop
        jmp short halt
    

提交回复
热议问题