Skip to content

Session Data Not Available via Get Until Accessed as Attribute #6798

@utkonos

Description

@utkonos

Version and Platform (required):

  • Binary Ninja Version: 5.0.7290
  • OS: macOS
  • OS Version: 15.4.1
  • CPU Architecture: x64

Bug Description:
A k/v stored in session data does not get populated properly in bv.session_data until after it has been accessed once via the attribute with the same name.

Steps To Reproduce:

  1. Open a database
  2. Open Python console
  3. Set a session k/v: bv.set_default_session_data('foo', 'bar')
  4. Try to retrieve the k/v via get: bv.session_data.get('foo')
  5. Notice that the return value is None
  6. Try to retrieve the k/v via the attribute: bv.session_data.foo
  7. Notice that the return value is bar
  8. Try to use get again: bv.session_data.get('foo')
  9. Notice that now the return value is as expected: bar

Expected Behavior:
Both ways of acceessing bv.session_data should return the same information.

Screenshots/Video Recording:

Image

Metadata

Metadata

Assignees

Labels

Component: Python APIIssue needs changes to the python APIEffort: TrivialIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaround

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions