1 Star 0 Fork 5

Meredith/luajit

forked from src-anolis-os/luajit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0052-Actually-implement-maxirconst-trace-limit.patch 884 Bytes
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-07-28 14:43 . init package version for an8.6
From 0a9ff94c4a1fcec2c310dcb092da694f23186e23 Mon Sep 17 00:00:00 2001
From: Mike Pall <mike>
Date: Sun, 14 Oct 2018 15:21:37 +0200
Subject: [PATCH 52/72] Actually implement maxirconst trace limit.
Suggested by spacewander.
---
src/lj_record.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lj_record.c b/src/lj_record.c
index 1a2b1c5..7f37d6c 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -2470,8 +2470,9 @@ void lj_record_ins(jit_State *J)
#undef rbv
#undef rcv
- /* Limit the number of recorded IR instructions. */
- if (J->cur.nins > REF_FIRST+(IRRef)J->param[JIT_P_maxrecord])
+ /* Limit the number of recorded IR instructions and constants. */
+ if (J->cur.nins > REF_FIRST+(IRRef)J->param[JIT_P_maxrecord] ||
+ J->cur.nk < REF_BIAS-(IRRef)J->param[JIT_P_maxirconst])
lj_trace_err(J, LJ_TRERR_TRACEOV);
}
--
2.20.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yueeranna/luajit.git
git@gitee.com:yueeranna/luajit.git
yueeranna
luajit
luajit
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385