Linux

Steinar H. Gunderson: Decompilation patterns, part 3: do-while-while

Today's decompilation pattern is a variation on yesterday's loop pattern, because loops are important and tend to induce a lot of transformations by the compiler. So assume you have code like this (perhaps after converting a goto): if (var_s0 > var_s1) { // Perhaps some other initialization stuff here do { … } while (var_s0 > var_s1); } Assuming there are no side effects from the initializations, a natural candidate would be that the programmer instead wrote: // Initialization stuff…

Quelle: Originalartikel öffnen

AI Assistant
Context loaded: Steinar H. Gunderson: Decompilation patterns, part 3: do-whi