-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0005 CRASH detected in 0x0000555535fae567 due to a fault at or near 0x0000000000000008 leading to SIGSEGV #1194
Comments
Hi! I simplified the reproducer to the following:
The reason is the missing ABC check for AREF (see
The reason is missing diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 96780fa2..f917b479 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -2164,6 +2164,7 @@ LJFOLDF(fwd_href_tdup)
LJFOLD(FLOAD TNEW IRFL_TAB_ASIZE)
LJFOLDF(fload_tab_tnew_asize)
{
+ PHIBARRIER(IR(fins->op1));
if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1))
return INTFOLD(fleft->op1);
return NEXTFOLD;
@@ -2172,6 +2173,7 @@ LJFOLDF(fload_tab_tnew_asize)
LJFOLD(FLOAD TNEW IRFL_TAB_HMASK)
LJFOLDF(fload_tab_tnew_hmask)
{
+ PHIBARRIER(IR(fins->op1));
if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1))
return INTFOLD((1 << fleft->op2)-1);
return NEXTFOLD;
@@ -2180,6 +2182,7 @@ LJFOLDF(fload_tab_tnew_hmask)
LJFOLD(FLOAD TDUP IRFL_TAB_ASIZE)
LJFOLDF(fload_tab_tdup_asize)
{
+ PHIBARRIER(IR(fins->op1));
if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1))
return INTFOLD((int32_t)ir_ktab(IR(fleft->op1))->asize);
return NEXTFOLD;
@@ -2188,6 +2191,7 @@ LJFOLDF(fload_tab_tdup_asize)
LJFOLD(FLOAD TDUP IRFL_TAB_HMASK)
LJFOLDF(fload_tab_tdup_hmask)
{
+ PHIBARRIER(IR(fins->op1));
if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1))
return INTFOLD((int32_t)ir_ktab(IR(fleft->op1))->hmask);
return NEXTFOLD; The loop part looks like the following after the patch:
|
IMHO the proposed fix is overreaching. It foils allocation sinking in particular. Sorry, running out of time to further analyze this right now. |
poc.txt
The text was updated successfully, but these errors were encountered: