binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Add `pure` as a function property

Open fuzyll opened this issue 3 years ago • 1 comments

What is the feature you'd like to have? I want to be able to use Edit Function Properties to mark a function as pure. The purpose here would be to allow the call to be optimized out entirely if the return value isn't used.

Is your feature request related to a problem? This could really clean up analysis of things like malware using API hammering. This might also be useful in cases like #2923 (and may even effectively be a duplicate, not entirely sure).

Additional Information: We should probably never set this attribute automatically, except possibly in the case where the user has supplied a header that has the function marked as such.

fuzyll avatar Jun 28 '22 20:06 fuzyll

Note that pure probably isn't the right word after more discussion. The actual attribute is something like "side-effect-free" but we want a more concise name and nobody liked pureish. 😉

psifertex avatar Jun 28 '22 21:06 psifertex

Duplicate of #1712

CouleeApps avatar Jul 06 '23 17:07 CouleeApps