Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 3, 2025

This PR fixes Binary Ninja MLIL None handling in extract_stackstring function and analyzes the codebase for similar issues.

Progress Checklist

  • Fix Binary Ninja MLIL None handling in extract_stackstring function

    • Added None check after retrieving MLIL in extract_stackstring function
    • Maintains backward compatibility with ILException handling
    • Prevents AttributeError when mlil is None in Binary Ninja 5.0.7174-dev+
  • Analyze Binary Ninja extractor for additional similar locations

    • Searched entire binja extractor directory for similar MLIL/HLIL/LLIL access patterns
    • Found that extract_stackstring was the only location with direct func.mlil access
    • Confirmed func.get_llil_at() and func.get_llils_at() methods already have proper None checks
    • No direct access to func.hlil or func.llil properties found in current codebase
  • Address additional similar locations (pending clarification)

    • Requested clarification on specific locations mentioned in review comment
    • Ready to implement similar fixes once specific locations are identified

Summary

The fix for the Binary Ninja MLIL None handling has been implemented. I've performed a comprehensive analysis of the Binary Ninja extractor codebase and found that the extract_stackstring function was the only location that directly accesses func.mlil. The existing func.get_llil_at() and func.get_llils_at() method calls already have proper None checks where needed.

I've requested clarification on the specific additional locations mentioned in the review comment to ensure all similar cases are addressed.

Fixes #2714.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Sep 3, 2025

@williballenthin 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copy link

google-cla bot commented Sep 3, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Copilot Copilot AI changed the title [WIP] Feature extraction error with binja backend Fix Binary Ninja MLIL None handling in extract_stackstring function Sep 3, 2025
@Copilot Copilot AI requested a review from williballenthin September 3, 2025 09:45
Copilot finished work on behalf of williballenthin September 3, 2025 09:45
@williballenthin
Copy link
Collaborator

hmm @xusheng6 i can't add you as a review but maybe you can add feedback as comments here, tagging @copilot ?

@williballenthin
Copy link
Collaborator

@copilot There are a few other similar places in the binja extractor, please remember to fix them as well

Copy link
Author

Copilot AI commented Sep 3, 2025

@copilot There are a few other similar places in the binja extractor, please remember to fix them as well

I've searched the entire Binary Ninja extractor codebase and found that the extract_stackstring function was the only location that directly accesses func.mlil.

The func.get_llil_at() and func.get_llils_at() methods already have proper None checks where needed. I didn't find any direct access to func.hlil or func.llil properties.

Could you point me to the specific other locations you're referring to? I want to ensure I address all the similar cases.

Copilot finished work on behalf of williballenthin September 3, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature extraction error with binja backend
2 participants