Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Wrong return value in aarch64 disassembler operation_to_str() function

未关闭 适合新手
#8,589 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c

调研方向

找到 operation_to_str 和 aarch64_disassemble,然后检查操作字符串是如何选择的,以及 NULL 是如何处理的。查看直接调用 operation_to_str 的 test.c,并验证 enum 和字符串数组检查。完成标准是返回行为与其他 to-string 函数一致,同时不破坏现有的直接调用方。

由索引模型根据 Issue 内容生成。

描述

The aarch64_get_operation calls operation_to_str which doesn't return a NULL value, as is common for other to string functions in the source code.

But aarch64_disassemble then verifies for NULL value here, which is always false:

	const char *operation = aarch64_get_operation(instruction);
	if (operation == NULL)
		return FAILED_TO_DISASSEMBLE_OPERATION;

I think the fix should be operation_to_str to return a NULL to keep API consistent. test.c calls it directly without checking for the NULL but it shouldn't be submitting wrong values because previous checks, as long the enum and the string array are in sync.

主要语言
C++
星标
1.3k
派生
297
平均合并
2 天 17 小时
30 天内合并 PR
15

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Vector35/binaryninja-api 的其他 Issue

查看 Vector35/binaryninja-api 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。