1 Star 0 Fork 59

qingxiyingyue/binutils

forked from src-openEuler/binutils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-PR28540-segmentation-fault-on-NULL-byte_get.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
From 96eb21265ebffbc28f767bed9a2b7650ecb9818d Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Thu, 4 Nov 2021 14:11:02 +1030
Subject: [PATCH] PR28540, segmentation fault on NULL byte_get
PR 28540
* objdump.c (dump_bfd): Don't attempt load_separate_debug_files
when byte_get is NULL.
(cherry picked from commit f2f105f518413ea3e4c212f89585f9a8a5dddcdd)
Reference:https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=96eb21265ebffbc28f767bed9a2b7650ecb9818d
Conflict:NA
---
binutils/objdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/binutils/objdump.c b/binutils/objdump.c
index a7b8303b992..50317b3d48f 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -4869,7 +4869,7 @@ dump_bfd (bfd *abfd, bool is_mainfile)
The test on is_mainfile is there because the chain of separate debug
info files is a global variable shared by all invocations of dump_bfd. */
- if (is_mainfile)
+ if (byte_get != NULL && is_mainfile)
{
load_separate_debug_files (abfd, bfd_get_filename (abfd));
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qingxiyingyue/binutils.git
git@gitee.com:qingxiyingyue/binutils.git
qingxiyingyue
binutils
binutils
master

搜索帮助