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

Function properties doesn't show effective global pointer value on user override

Open zznop opened this issue 10 months ago • 3 comments

Bug Description:

Function properties dialog shows the global pointer value identified by Binja, even if it is overridden by the user.

Image

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open the binary (fierce dolphin jumps quietly for V35 employees)
  2. Run bv.set_user_global_pointer_value(Undetermined()) (this can also be done from the command pallette)
  3. Open the function properties dialog for the function at 0x64
  4. See that the GP is shown as 0x6 (and there's no indicator it has been overridden by the user)

Expected Behavior: We should have some visual indicator that the user overrode the global pointer value. This is also a problem if the user sets analysis.limits.maxGlobalPointerValueUpdates to 0. Binja still performs the analysis to identify the global pointer value, but the effective global pointer remains undetermined.

Additional Information: See https://github.com/Vector35/binaryninja-api/issues/6614#issuecomment-2815458797

zznop avatar Apr 18 '25 14:04 zznop

I believe this is expected behavior. The gp value displayed here is the value suggested by this function, not the one being used by this function. Maybe we should change the text of that prompt

xusheng6 avatar May 20 '25 14:05 xusheng6

I believe this is expected behavior. The gp value displayed here is the value suggested by this function, not the one being used by this function. Maybe we should change the text of that prompt

Yes, I think we should display both the suggested value and the effective value that's being used by analysis (considering it's not uncommon for users to need to override GP).

zznop avatar May 20 '25 15:05 zznop

I believe this is expected behavior. The gp value displayed here is the value suggested by this function, not the one being used by this function. Maybe we should change the text of that prompt

Yes, I think we should display both the suggested value and the effective value that's being used by analysis (considering it's not uncommon for users to need to override GP).

Yeah that is a good idea! I will be writing a blog post on working with GP values, which would hopefully clear up some of the confusion here. But I agree with you that showing both can be helpful for users

xusheng6 avatar Jun 11 '25 03:06 xusheng6