Could this code damage my processor??!!
- by Osama Gamal
A friend sent me that code and alleges that it could damage the processor. Is that true?
void damage_processor() {
while (true) {
// Assembly code that sets the five control registers bits to ones which causes a bunch of exceptions in the system and then damages the processor
Asm(
"mov cr0, 0xffffffff \n\t"
"mov cr1, 0xffffffff \n\t"
"mov cr2, 0xffffffff \n\t"
"mov cr3, 0xffffffff \n\t"
"mov cr4, 0xffffffff \n\t"
)
}
}
Is that true?