Closed negasora closed 1 week ago
Fixed in 4.2.6413-dev
This is a regression introduced earlier. The most recent fix for this on dev is suspected to be not optimal. I am re-opening this so that I can see when it was broken, and investigate a more proper way to fix it.
We also need a unit test for user global pointer value so this does not happen again in the future
The offending commit is https://github.com/Vector35/binaryninja/commit/ce53ad98ce13715e4259daec0fe7ad75aa635c31. The problem is, after the commit, the re-analysis after setting a user global pointer value no longer does global pointer value analysis. In other words, the newly set user global pointer value would not take effect.
The fix https://github.com/Vector35/binaryninja/commit/8bcf04925294127e5de719a74ea92b278503dbbf is problematic, since the global pointer value analysis actually does two things: elect a global pointer value using the majority vote (or using the user value if there is one), and if the new value is different from the old one, use the new one to update the analysis of the functions that use an incoming global pointer value. In other words, despite the fix make the analysis report the correct global pointer value, the value is actually not used in the analysis at all
Admittedly, the way the global pointer value analysis work is a bit complex, and I am not against refactoring it to make it more readable and easier to maintain. However, at this moment, I believe we want a more conservative fix for the release.
Fixed in 4.2.6423-dev
.