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

bugfix: fixed a segfault when unsinking 64-bit pointers. #46

Merged
merged 2 commits into from
Mar 28, 2019

Conversation

thibaultcha
Copy link
Member

@thibaultcha thibaultcha commented Mar 21, 2019

The unsinking code was not using the correct layout for GC64 IR constants (value in adjacent slot) for this case. This patch is a derivative of raptorjit/raptorjit#246 ported for LuaJIT itself. Fixed after an intense debugging session with @lukego.

Also included in this PR: a matrix of XCFLAGS on Travis-CI, to which we added non Lua 5.2 and GC64 modes.

Sister PR with test: openresty/luajit2-test-suite#6

Fixes the issue initially reported at: openresty/lua-resty-core#232

The unsinking code was not using the correct layout for GC64 IR
constants (value in adjacent slot) for this case.

This patch is a derivative of
raptorjit/raptorjit#246 ported for LuaJIT
itself.

Fixed after an intense debugging session with @lukego.

Co-authored-by: Luke Gorrie <lukego@gmail.com>
@agentzh
Copy link
Member

agentzh commented Mar 25, 2019

@thibaultcha Have you guys submitted the patch to the luajit mailing list? Didn't see it the last time I checked.

@agentzh
Copy link
Member

agentzh commented Mar 25, 2019

Ah, this is a good catch. And should be safe to merge. Many thanks for digging it!

@thibaultcha thibaultcha merged commit 9717269 into openresty:v2.1-agentzh Mar 28, 2019
@thibaultcha thibaultcha deleted the fix/unsink-64-ptr branch March 28, 2019 03:34
thibaultcha added a commit to openresty/lua-resty-core that referenced this pull request Mar 29, 2019
…round a bug in LuaJIT's allocation sinking optimizer which might lead to NULL cdata pointers and segfaults."

This reverts commit c99fbaf following
the LuaJIT at openresty/luajit2#46.
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.

None yet

2 participants