Skip to content

Conversation

@vaibhav-bhadade
Copy link

Hi
Following segmentation fault has been observed and fixed while testing few products on ppc64le .

Test failing on ppc64le, when i have tested with luajit2-test-suite using luajit

[root@2092f12255fb luajit2-test-suite]# gdb --args luajit test/misc/tonumber_scan.lua

Starting program: /usr/local/bin/luajit test/misc/tonumber_scan.lua

Program received signal SIGSEGV, Segmentation fault.
0x00000000000030e8 in ?? ()
Missing separate debuginfos, use: yum debuginfo-install glibc-2.28-189.5.el8_6.ppc64le libgcc-8.5.0-15.el8.ppc64le
(gdb) bt
#0 0x00000000000030e8 in ?? ()
#1 0x000000001003fcf4 in lj_BC_FUNCC ()
#2 0x000000001001cb68 in lua_pcall (L=0x79600380, nargs=0, nresults=-1, errfunc=2) at lj_api.c:1145
#3 0x0000000010004de8 in docall (L=0x79600380, narg=0, clear=0) at luajit.c:122
#4 0x0000000010005ae4 in handle_script (L=0x79600380, argx=0x7ffffffffb30) at luajit.c:292
#5 0x00000000100069ec in pmain (L=0x79600380) at luajit.c:550
#6 0x000000001003fcf4 in lj_BC_FUNCC ()
#7 0x000000001001cda0 in lua_cpcall (L=0x79600380, func=0x10006808 , ud=0x0) at lj_api.c:1173
#8 0x0000000010006b8c in main (argc=2, argv=0x7ffffffffb28) at luajit.c:581

we have verified this locally with openresty version 1.21.4.1 .

[root@APIC1 luajit2-test-suite]# ./run-tests -v /usr/local/bin/luajit/ /usr/local/bin/luajit/bin/luajit gcc g++ test/misc/iter.lua
=== test/misc/iter.lua
All tests successful.
[root@APIC1 luajit2-test-suite]#

Also verified the luajit-test-suite test cases .

@zhuizhuhaomeng
Copy link
Contributor

@ManirajDeivendran would you please help review this PR?

@seth-priya
Copy link

Hi, can someone from the community please help review this? Maniraj has moved to a different role/organization and might not be watching this @zhuizhuhaomeng , thanks in advance!

|.endif
| lwz PC, -16(RB) // Restore PC from [cont|PC].
| subi TMP2, RD, 8
|// PC value corrected to avoid segfault
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this part be merged into [email protected]:LuaJIT/LuaJIT.git

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhuizhuhaomeng
Copy link
Contributor

Hi, can someone from the community please help review this? Maniraj has moved to a different role/organization and might not be watching this @zhuizhuhaomeng , thanks in advance!

The PR contains changes that may affect other PPC arches which are supported by the upstream.

@vikasgupta8
Copy link

Hi @zhuizhuhaomeng,

LuaJit does not support ppc64le and community unlikely to add support for it.

But this change is for ppc64le support.

@zhuizhuhaomeng
Copy link
Contributor

Hi @zhuizhuhaomeng,

LuaJit does not support ppc64le and community unlikely to add support for it.

But this change is for ppc64le support.

I know that. But your changes will affect all the PPC architectures.
Am I right? do not need to add something like .if P64 to limit the scope of your changes?

@vikasgupta8
Copy link

Sure @zhuizhuhaomeng I will update the changes to limit the scope in .if P64

@vikasgupta8
Copy link

Hi @zhuizhuhaomeng I have added the code for ppc64le in .if P64 block to keep ppc64le changes separate from other ppc architecture.

@zhuizhuhaomeng
Copy link
Contributor

zhuizhuhaomeng commented Oct 13, 2023

@vikasgupta8
You need to rebase to the latest branch of v2.1-agent.
There have been many changes since our last conversation.

@sumitd2
Copy link
Contributor

sumitd2 commented Oct 19, 2023

@zhuizhuhaomeng You may close this PR. The changes here have been merged with #211. Also, #211 has all tests passing on ppc64le, so nothing else is required.
cc: @vikasgupta8 @seth-priya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants