|
| 1 | +diff --git a/lgc.c b/lgc.c |
| 2 | +index 0f89451c..c100b44b 100644 |
| 3 | +--- a/lgc.c |
| 4 | ++++ b/lgc.c |
| 5 | +@@ -1585,6 +1585,7 @@ static void atomic (lua_State *L) { |
| 6 | + ** Do a sweep step. The normal case (not fast) sweeps at most GCSWEEPMAX |
| 7 | + ** elements. The fast case sweeps the whole list. |
| 8 | + */ |
| 9 | ++__attribute__((no_sanitize("implicit-integer-sign-change"))) |
| 10 | + static void sweepstep (lua_State *L, global_State *g, |
| 11 | + lu_byte nextstate, GCObject **nextlist, int fast) { |
| 12 | + if (g->sweepgc) |
| 13 | +diff --git a/lstring.c b/lstring.c |
| 14 | +index 75635142..72411834 100644 |
| 15 | +--- a/lstring.c |
| 16 | ++++ b/lstring.c |
| 17 | +@@ -49,7 +49,7 @@ int luaS_eqstr (TString *a, TString *b) { |
| 18 | + (memcmp(s1, s2, len1) == 0)); /* equal contents */ |
| 19 | + } |
| 20 | + |
| 21 | +- |
| 22 | ++__attribute__((no_sanitize("shift", "unsigned-integer-overflow", "unsigned-shift-base"))) |
| 23 | + static unsigned luaS_hash (const char *str, size_t l, unsigned seed) { |
| 24 | + unsigned int h = seed ^ cast_uint(l); |
| 25 | + for (; l > 0; l--) |
| 26 | +diff --git a/lvm.c b/lvm.c |
| 27 | +index c70e2b8a..3e3274de 100644 |
| 28 | +--- a/lvm.c |
| 29 | ++++ b/lvm.c |
| 30 | +@@ -1194,7 +1194,7 @@ void luaV_finishOp (lua_State *L) { |
| 31 | + #define vmcase(l) case l: |
| 32 | + #define vmbreak break |
| 33 | + |
| 34 | +- |
| 35 | ++__attribute__((no_sanitize("float-divide-by-zero", "integer-divide-by-zero"))) |
| 36 | + void luaV_execute (lua_State *L, CallInfo *ci) { |
| 37 | + LClosure *cl; |
| 38 | + TValue *k; |
1 | 39 | diff --git a/makefile b/makefile |
2 | 40 | index 8674519f..dd0fb23e 100644 |
3 | 41 | --- a/makefile |
|
0 commit comments