openresty / luajit2

OpenResty's Branch of LuaJIT 2
https://luajit.org/luajit.html
Other
1.2k stars 193 forks source link

Tests failing for s390x #178

Open Bisht13 opened 2 years ago

Bisht13 commented 2 years ago

Tests like iter-bug.lua and jit_record.lua are failing and giving the following error from the test suite.

[aditya@clftest misc]$ ~/testing/bin/luajit jit_record.lua 
/home/aditya/testing/bin/luajit: jit_record.lua:1: module 'jit.opt' not found:
    no field package.preload['jit.opt']
    no file './jit/opt.lua'
    no file '~/testing/share/luajit-2.1.0-beta3/jit/opt.lua'
    no file '/usr/local/share/lua/5.1/jit/opt.lua'
    no file '/usr/local/share/lua/5.1/jit/opt/init.lua'
    no file '~/testing/share/lua/5.1/jit/opt.lua'
    no file '~/testing/share/lua/5.1/jit/opt/init.lua'
    no file './jit/opt.so'
    no file '/usr/local/lib/lua/5.1/jit/opt.so'
    no file '~/testing/lib/lua/5.1/jit/opt.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file './jit.so'
    no file '/usr/local/lib/lua/5.1/jit.so'
    no file '~/testing/lib/lua/5.1/jit.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'

From the documentation of LuaJIT, the module is built-in and optimization is turned on by default!

This is true as well from the following results (this is compared after commenting out require "jit.opt".start("maxside=0")),

[aditya@clftest misc]$ time lua iter-bug.lua 

real    0m1.062s
user    0m1.059s
sys 0m0.001s
[aditya@clftest misc]$ time ~/testing/bin/luajit iter-bug.lua 

real    0m0.171s
user    0m0.170s
sys 0m0.001s
alhad-deshpande commented 2 months ago

@zhuizhuhaomeng These 2 tests are failing on ppc64le now, can you please let me know how these tests are passing on s390x because JIT is not enabled on s390x as well.

zhuizhuhaomeng commented 2 months ago

@alhad-deshpande We need the guys from IBM to resolve this issue.