mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Prevent sanitizer warning in snap_restoredata().
Thanks to Sergey Kaplun. #1193
This commit is contained in:
parent
9b5e837ac2
commit
4a22050df9
@ -731,7 +731,6 @@ static void snap_restoredata(GCtrace *T, ExitState *ex,
|
|||||||
*(lua_Number *)dst = (lua_Number)*(int32_t *)dst;
|
*(lua_Number *)dst = (lua_Number)*(int32_t *)dst;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
src = (int32_t *)&ex->gpr[r-RID_MIN_GPR];
|
|
||||||
#if !LJ_SOFTFP
|
#if !LJ_SOFTFP
|
||||||
if (r >= RID_MAX_GPR) {
|
if (r >= RID_MAX_GPR) {
|
||||||
src = (int32_t *)&ex->fpr[r-RID_MIN_FPR];
|
src = (int32_t *)&ex->fpr[r-RID_MIN_FPR];
|
||||||
@ -743,8 +742,11 @@ static void snap_restoredata(GCtrace *T, ExitState *ex,
|
|||||||
#else
|
#else
|
||||||
if (LJ_BE && sz == 4) src++;
|
if (LJ_BE && sz == 4) src++;
|
||||||
#endif
|
#endif
|
||||||
}
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
src = (int32_t *)&ex->gpr[r-RID_MIN_GPR];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lua_assert(sz == 1 || sz == 2 || sz == 4 || sz == 8);
|
lua_assert(sz == 1 || sz == 2 || sz == 4 || sz == 8);
|
||||||
|
Loading…
Reference in New Issue
Block a user