Negation in constant folding of '>>' may overflow

This commit is contained in:
Roberto Ierusalimschy
2022-09-23 11:08:10 -03:00
parent cfbe378f90
commit 26be27459b
4 changed files with 19 additions and 4 deletions

5
lvm.h
View File

@@ -110,6 +110,11 @@ typedef enum {
luaC_barrierback(L, gcvalue(t), v); }
/*
** Shift right is the same as shift left with a negative 'y'
*/
#define luaV_shiftr(x,y) luaV_shiftl(x,intop(-, 0, y))
LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2);