3

Is there any elegant way to calculate the maximum possible stack depth utilization of a program, using IDAPython?

currently my best approach is iterating through all functions and counting stack-increasing instructions.

  • 2
    Are you looking for the max depth available to the program or the max depth actually utilized by the program? Also, what OS are you focused on? – NirIzr Jul 8 '18 at 12:22
  • looking for max depth utilized by the program and it isn't OS dependent (lets say linux) – Yoav Danieli Jul 8 '18 at 13:59
  • @YoavDanieli maximum depth actually utilized by a program is not the same as maximum possible stack depth utilization, as @NirIzr has pointed out. Please clarify what you are asking. Resource limits such as maximum stack size available to a process are OS dependent. See getrlimit(2) for more on this. – julian Jul 8 '18 at 15:32
  • Yes, thanks, i think @NirIzr clarified this form me :) – Yoav Danieli Jul 9 '18 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.