lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I compiled lua with the gcc undefined behaviour sanitizer turned on
(-fsanitize=undefined).

    $ make MYCFLAGS="-fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1
-fsanitize=undefined" MYLDFLAGS="-fsanitize=undefined" linux

Here are the errors I got running test suite:

lauxlib.c:472:3: runtime error: null pointer passed as argument 2,
which is declared to never be null
lvm.c:1174:11: runtime error: signed integer overflow:
9223372036854775807 - -1 cannot be represented in type 'long long int'
lvm.c:1142:23: runtime error: signed integer overflow:
-9223372036854775808 + -1 cannot be represented in type 'long long
int'
lmathlib.c:42:18: runtime error: negation of -9223372036854775808
cannot be represented in type 'long long int'; cast to an unsigned
type to negate this value to itself
ltable.c:504:7: runtime error: signed integer overflow:
-9223372036854775808 - 1 cannot be represented in type 'long long int'
ltablib.c:220:13: runtime error: signed integer overflow:
9223372036854775807 + 1 cannot be represented in type 'long long int'
ltable.c:504:7: runtime error: signed integer overflow:
-9223372036854775808 - 1 cannot be represented in type 'long long int'
ltable.c:504:7: runtime error: signed integer overflow:
-9223372036854775808 - 1 cannot be represented in type 'long long int'
lbitlib.c:193:16: runtime error: left shift of 15 by 28 places cannot
be represented in type 'int'