Redesign/Reconcile the BinaryDataNotifications for the MemoryMap System

Open
#6,501 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by tracing MemoryMap::AddDataMemoryRegion and the BinaryDataNotification callbacks, especially OnSegmentUpdated and OnSegmentAdded. Reproduce the segment addition behavior in the DSC-style binary view described in the report, then verify that the added segment triggers OnSegmentAdded and is passed as the callback argument.

Written by the indexing model from the issue text.

Description

Component: Core Effort: Medium Impact: Medium

Version and Platform (required):

  • Binary Ninja Version: 4.3.7047-dev (0672492d)
  • OS: macOS
  • OS Version: 15.2
  • CPU Architecture: M1

Bug Description:
When calling MemoryMap::AddDataMemoryRegion to add segments to a binary view (like the DSC plugin does), it only triggers the binary view notification void BinaryDataNotification::OnSegmentUpdated(BinaryView* data, Segment* segment) and segment is always the first segment in the binary. So for the DSC view this is the DSC header segment from 0x180000000 to 0x180000208.

Expected Behavior:
The OnSegmentAdded callback should be called when adding segments using MemoryMap::AddDataMemoryRegion and the correct segment (the one that was just added) should be passed to the callback.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.