TransWikia.com

how to calculate max possible stack size utilization

Reverse Engineering Asked by Yoav Danieli on March 3, 2021

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.

One Answer

IDAPython-function get_frame_size(ea) gives size of stack in bytes. So you can get max stack through all available functions:

"0x%04X" % max(get_frame_size(f) for f in Functions(0, BADADDR))

Answered by prusanov on March 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP