Skip to content

Instant crash during stage 1 analysis when a native architecture hook is registered #7974

@WeiN76LQh

Description

@WeiN76LQh

Version and Platform (required):

  • Binary Ninja Version: 5.3.9138-dev Ultimate (546385d4)
  • Edition: Ultimate
  • OS: macOS
  • OS Version: 26.3
  • CPU Architecture: M1

Bug Description:
A recent change seems to have broken native ArchitectureHook plugins. By registering a completely barebones architecture hook that doesn't replace any functionality, Binary Ninja crashes immediately when the first stage analysis begins.

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

  1. Compile the native plugin provided below
  2. Open any arm64 binary in Binary Ninja
  3. Observe immediate crash once analysis begins

Binary:

#include "binaryninjaapi.h"

using namespace BinaryNinja;
class arm64ArchitectureExtension : public ArchitectureHook {
public:
    arm64ArchitectureExtension()
        : ArchitectureHook(Architecture::GetByName("aarch64"))
    {
    }
};

extern "C" {
BN_DECLARE_CORE_ABI_VERSION

BINARYNINJAPLUGIN void CorePluginDependencies()
{
    AddRequiredPluginDependency("arch_arm64");
}

BINARYNINJAPLUGIN bool CorePluginInit()
{
    Architecture* arm64ext = new arm64ArchitectureExtension();
    Architecture::Register(arm64ext);
    return true;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions