Vector35 / binaryninja-api

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

Functions should be reanalyzed after using the assemble dialog #5841

Open jonpalmisc opened 1 month ago

jonpalmisc commented 1 month ago

When using the assemble dialog, it seems that Binary Ninja does not always re-analyze the function, which produces weird results if assembling across function boundaries, etc.

I think at a minimum, the function that contains the address where the assemble dialog started assembling should be re-analyzed to prevent this.

Can't share a screenshot or binary of when I observed this, but can try to reproduce with another binary if clarification is needed.

Binary Ninja 4.1 Stable, macOS

xusheng6 commented 1 month ago

I cannot reproduce this, I checked the code and I believe that we send a BinaryDataWritten notification for the entire range that gets written to, and all functions which overlap with it should get updated. Could you please try to find a different sample for it that you can share with us?

Also, can you observe that after the patching, is it:

  1. The analysis does not get updated, or
  2. The analysis gets updated, but the function with changes does not change

Also, are you suggesting that you used the assemble dialog in function 1, and the patch also changes some bytes in another funciton, e.g., function 2, and the analysis of function 2 does not get updated?