I am trying to understand the difference between a function's offset and its minbound in radare2. Consider this function in radare2 (output of aflj):

        "offset": 4549740,
        "name": "sym.tightdb::TableViewBase::sync_distinct_view_unsignedlong",
        "size": 2394,
        "realsz": 4598,
        "stackframe": 1200,
        "calltype": "(null)",
        "cost": 4425,
        "cc": 103,
        "bits": 16,
        "type": "fcn",
        "nbbs": 213,
        "edges": 298,
        "ebbs": 9,
        "minbound": "4267940",
        "maxbound": "4552134",

There are a few things which are not clear:

When I do pdf @4549740 (print function at offset), radare2 starts to print at 0x456644 (=4548164), which is none of the values above.

I would expect that offset always points to the begin of the function's first basic block. Indeed, this seems to be the case here, as offset + realsize = maxbound. But maxbound - minbound = 284194 and this is clearly much longer than the function should be.

So, what does minbound indicate and how does it differ from offset?

Example binary

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.