Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiterra.t fails on PPC64le #583

Open
elliottslaughter opened this issue Jul 8, 2022 · 0 comments
Open

multiterra.t fails on PPC64le #583

elliottslaughter opened this issue Jul 8, 2022 · 0 comments

Comments

@elliottslaughter
Copy link
Member

elliottslaughter commented Jul 8, 2022

On PPC64le, multiterra.t crashes with a segfault. Debugging points to this line:

acc[threadid] = C.luaL_checknumber(L,-1)

That is, we successfully initialize the new Terra, print inside it, and return. The return value seems to be corrupt and no Lua APIs I've tried have been able to get anything from it at all (e.g., lua_type, luaL_typename).

To be sure, I checked the luaL_checknumber declaration and it matches the reference manual. I also checked the value of lua_Number in luaconf.h in the specific installation and it matched double. (But it would be frankly strange for any of this to be off since it matches on every other platform we've run on.)

Running the test with this line commented out allows it to run to completion, but obviously fails because the correct result is not returned.

I also noticed the presence of heisenbugs when introducing printf calls, suggesting the possibility of bad calling convention support reading the wrong memory locations (or similar).

For simplicity, I modified the test to run a "sequential" version where I enable the Windows workaround to stub out the pthreads API. Therefore there are no threads in the test and no possibility of concurrency bugs.

Right now I'm inclined to chalk this up to Moonjit misbehaving again, though my evidence is circumstantial.

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

No branches or pull requests

1 participant