At Google we discovered a signed integer overflow bug in Lua 5.2.4. This was discovered with "clang -fsanitize=signed-integer-overflow".
Roberto or Luiz can correct me if I'm wrong, but I believe Lua 5.2 is no longer supported. Additionally, according to the symbol index [1], the luai_hashnum macro does not exist in Lua 5.3.
[1]
https://www.lua.org/source/5.3/idx.html