Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
938 stars 213 forks source link

Warp applied signatures sometimes require second reanalysis to show up #6116

Open emesare opened 1 week ago

emesare commented 1 week ago

When a function is matched WARP will add a user type to the function and then mark the function for updates.

Relevant code: https://github.com/Vector35/binaryninja-api/blob/e856d391d377d0a723563925bb0a841ead5ae012/plugins/warp/src/plugin.rs#L39-L57

However, If one navigates to the function before analysis has finished the function will never get that type applied, until some other analysis is kicked off. This doesn't seem to happen every time, only sometimes.

Its like its skipping this update analysis at the end of function matching: https://github.com/Vector35/binaryninja-api/blob/67db1cdebbef60ef0830656c076cde0a1d8d870e/plugins/warp/src/plugin/workflow.rs#L71

Repro steps:

  1. Open any binary and go to a function and retype it, then create a signature file (WARP\\Create Signature File).
  2. Re-open the same binary and navigate to that function, then close the binary.
  3. Re-open the binary a third time, you should be pre-navigated to the function and see the retyped argument missing.
  4. Run "Reanalyze" and observe the type now there.