It appears to me that in my function the compiler has reused a stack slot for two variables of types. However, Hex-Rays has not recognized it as such. How can I split the local variable into two?

  • I think it depends on the exact situation, can you post an example? – Willem Hengeveld May 26 at 10:30
  • @WillemHengeveld it's a pretty long function, but here: gist.github.com/Zhentar/d65a0bbdcd489719cbec7b0b00761f85 a3a, a4a, time, and time_1 are ones that I've noticed that seem to be aliased – Zhentar May 26 at 21:28
  • I usually add structs with unions to make the output slightly more readable when the compiler has reused a stack slot for different variables. – Léo Lam May 27 at 8:55
  • @LéoLam you should post that as an answer so I can accept it :) – Zhentar May 28 at 3:06
up vote 1 down vote accepted

I usually add structs with unions to make the output slightly more readable when the compiler has reused a stack slot for different variables.

In 7.2, it seems that you can force the decompiler to "create a new variable", which makes this easier and less ugly. Yay!

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.