1 Star 0 Fork 5

yelvens/luajit_anolis

forked from src-anolis-os/luajit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0016-DynASM-x86-Fix-potential-REL_A-overflow.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-07-28 14:43 . init package version for an8.6
commit 6a2d8b0b4d49eb5aac600c219e5903420806e56e
Merge: bf12f1d 0c0e7b1
Author: Mike Pall <mike>
Date: Wed Sep 20 19:42:34 2017 +0200
Merge branch 'master' into v2.1
From 0c0e7b168ea147866835954267c151ef789f64fb Mon Sep 17 00:00:00 2001
From: Mike Pall <mike>
Date: Wed, 20 Sep 2017 19:39:50 +0200
Subject: [PATCH 16/72] DynASM/x86: Fix potential REL_A overflow.
Thanks to Joshua Haberman.
---
dynasm/dasm_x86.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dynasm/dasm_x86.h b/dynasm/dasm_x86.h
index 90dc5d1..f9260b0 100644
--- a/dynasm/dasm_x86.h
+++ b/dynasm/dasm_x86.h
@@ -395,7 +395,8 @@ int dasm_encode(Dst_DECL, void *buffer)
}
case DASM_REL_LG: p++; if (n >= 0) goto rel_pc;
b++; n = (int)(ptrdiff_t)D->globals[-n];
- case DASM_REL_A: rel_a: n -= (int)(ptrdiff_t)(cp+4); goto wd; /* !x64 */
+ case DASM_REL_A: rel_a:
+ n -= (unsigned int)(ptrdiff_t)(cp+4); goto wd; /* !x64 */
case DASM_REL_PC: rel_pc: {
int shrink = *b++;
int *pb = DASM_POS2PTR(D, n); if (*pb < 0) { n = pb[1]; goto rel_a; }
--
2.20.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ihuang77/luajit_anolis.git
git@gitee.com:ihuang77/luajit_anolis.git
ihuang77
luajit_anolis
luajit_anolis
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385