Vector35 / binaryninja-api

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

Lag when searching for enumeration for negative values #4114

Closed op2786 closed 1 year ago

op2786 commented 1 year ago

Version and Platform (required):

Bug Description: I noticed there there is a little lag when we try to search enumeration for negative values.

Example code:

00415e54  HANDLE hFile = CreateFileA(file_name, 0x80000000, FILE_SHARE_NONE, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr)
00415e5f  if (hFile == 0xffffffff) {
00415e61    *size_out = 0
00415e61  }

When I click on 0xffffffff and press M in order to open select enum dialog, dialog show up after a little bit of lag.

fuzyll commented 1 year ago

A few of us have tried to reproduce this on 3.5.4320-dev and have been unsuccessful. Are you able to reproduce this still? If not, we might've fixed it in the past and didn't update this isssue.

fuzyll commented 1 year ago

Closing this since we haven't been able to reproduce it. If anyone is able to help point us in the right direction (is this dependent on platform/binary/some other set of actions?), happy to reopen it and get it fixed if it's still an issue.

op2786 commented 9 months ago

@fuzyll , I can still reproduce this on 3.6.4690.

Recording 2023-12-04 at 10 19 17

fuzyll commented 9 months ago

Thanks! I think I misunderstood the original issue and was trying the wrong thing.

That said, I still haven't been able to repro this on macOS. I tried with both a smaller binary and a much larger one (~40MB) that has a bunch of enum types defined.

I'll try again on my Windows box, but in the meantime, is there any other info you can give me? (A copy of the database would be best, but the original binary or even just the enum types that have been defined may be very useful.)

fuzyll commented 9 months ago

@op2786 was able to get me the database, which is great! He also indicated that this happens on macOS as well.

Unfortunately, I still can't seem to reproduce the issue. :( This is how it looks for me:

https://github.com/Vector35/binaryninja-api/assets/607452/d5e2e993-a264-4288-bce6-5a95ab9b7a66

On my Windows 11 box, it was a little more sluggish than this. But, not to the degree shown in op2768's video above.

Both of these machines have mid-to-high-end specs. What hardware are you running on? And do you have any plugins installed? Wondering if I'm just not seeing the issue because my machines are more capable or if perhaps there's a plugin interaction we're missing.