binaryninja-api
binaryninja-api copied to clipboard
Error messages when trying to undo an undefined function
Repro steps:
- Open any binary
- Undefine a function
- Undo it
- 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!
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
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.