程序為單進程多線程
每個線程開啟一個LuaJIT虛擬機,版本為LuaJIT 2.1.0-beta3
在高並發情況下,lua代碼會出現詭異情況,例如:
if true then if xxx == 1 then error("err") end else if xxx ~= 1 then error("err") end if not xxx == 1 then error("err") end end
當xxx為1時,按理應該 xxx ~= 1為false,但是很奇怪的是反而為true。只有 not xxx == 1才為false
當把每個線程拆為獨立進程后,此詭異情況消失。
故猜測是luajit問題。
ps.暫時無法用獨立的測試用例來重現此問題。