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

Move luajit-specific elements to the end of state structs #107

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Move luajit-specific elements to the end of state structs #107

merged 1 commit into from
Oct 2, 2020

Conversation

siddhesh
Copy link
Collaborator

@siddhesh siddhesh commented Oct 2, 2020

Putting prng and saved_jit_state in the middle of the struct messed with alignments on
Armv7. Avoid the problem by moving the luajit2-specific elements to the end.

Fixes #106. It leaves just one new test failure introduced by the merge, which I will look at next.

Putting prng and saved_jit_base in the middle of the struct messed
with alignments on Armv7.  Avoid the problem by moving the prng to the
end so that the upstream hack of adding padding at the end works
correctly.

Fixes #106.
@siddhesh siddhesh changed the title Move prng to the end of jit_State Move luajit-specific elements to the end of state structs Oct 2, 2020
@siddhesh
Copy link
Collaborator Author

siddhesh commented Oct 2, 2020

This should fix all new failures in armv7 now. Introducing saved_jit_base and prng in the middle of the struct seemed to mess with the alignments of accesses of global_State, jit_State elements through gg_state as offset from its dispatch table. Putting the extension elements to the end fixes this.

@agentzh agentzh merged commit 5f895f8 into openresty:v2.1-agentzh Oct 2, 2020
@agentzh
Copy link
Member

agentzh commented Oct 2, 2020

@siddhesh Merged. Thanks!

@agentzh
Copy link
Member

agentzh commented Oct 2, 2020

@siddhesh Yeah, still one more failure as compared to the version before the merge. BTW, it'll also be great if you can have also have a look at those 2 original test failures on ARMv7. Thanks!

@siddhesh
Copy link
Collaborator Author

siddhesh commented Oct 3, 2020

Sorry, #107 should have been part of this, not sure how I missed it. I'll merge it in once Travis runs clean.

@siddhesh
Copy link
Collaborator Author

siddhesh commented Oct 3, 2020

The two failures look like qemu segfaults, so not related to luajit2.

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.

A lot of tests failed on armv7 after merging #104
2 participants