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

Error messages when trying to undo an undefined function

Open xusheng6 opened this issue 1 year ago • 1 comments

Repro steps:

  1. Open any binary
  2. Undefine a function
  3. Undo it
  4. Observe the error message:
[Default] Failed to translate saved 'aarch64' id (1, 73) to running arch version!
[Default] Failed to translate saved 'aarch64' id (1, 74) to running arch version!
[Default] Failed to translate saved 'aarch64' id (1, 83) to running arch version!
[Default] Failed to translate saved 'aarch64' id (1, 84) to running arch version!
[Default] Failed to translate saved 'aarch64' id (1, 85) to running arch version!
[Default] Failed to translate saved 'aarch64' id (1, 86) to running arch version!
[Default] Failed to translate saved 'aarch64' id (1, 87) to running arch version!

xusheng6 avatar Sep 27 '24 15:09 xusheng6

As a note, the error messages do not should up if I redefine the function manually, it only shows up when I undo the action that undefines it

xusheng6 avatar Sep 27 '24 15:09 xusheng6

The root cause here seems that we're not storing the arch translation table along with the undo action. This is a significant issue but only if the arch enum table changes and someone tries to remove an auto function and undo it. So ultimately is pretty hard of an edge case to hit.

plafosse avatar Mar 06 '25 20:03 plafosse