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

Luajit fold machinery needs extra checks for correct transformations #4376

Closed
sergos opened this issue Jul 24, 2019 · 3 comments
Closed

Luajit fold machinery needs extra checks for correct transformations #4376

sergos opened this issue Jul 24, 2019 · 3 comments
Assignees
Labels
bug Something isn't working luajit
Milestone

Comments

@sergos
Copy link
Contributor

sergos commented Jul 24, 2019

Tarantool version:
master (2.2)
OS version:
Ubuntu 18.04
Bug description:
Fold machinery in luajit (src/lj_opt_fold.c) neglects data dependency for an IR. Thus SNEW result can be intermixed with original STR pointer, leading to incorrect result of pointer arithmetics. Details: LuaJIT/LuaJIT#505

A stub solution is to disable the transformation and this tracker is to figure out the correct way to detect the data dependency - apparently, the STRREF should be the only use of the SNEW result.

Steps to reproduce:

test-run.py luajit-tap/fold_bug_LuaJIT_505.test.lua

Optional (but very desirable):

  • coredump
  • backtrace
  • netstat
@sergos sergos self-assigned this Jul 26, 2019
@kyukhin kyukhin added this to the 1.10.4 milestone Jul 31, 2019
@kyukhin kyukhin added bug Something isn't working luajit labels Jul 31, 2019
@Totktonada
Copy link
Member

Related issue in openresty: openresty/luajit2#47

@kyukhin
Copy link
Contributor

kyukhin commented Aug 15, 2019

Fixed by 587532e

@kyukhin kyukhin closed this as completed Aug 15, 2019
@Totktonada
Copy link
Member

Fixed in the LuaJIT submodule in tarantool/luajit@587532e

The LuaJIT submodule is promoted to this commit in 2.3.0-18-ga634bd7de, 2.2.1-8-gf20e692d5, 2.1.2-148-g4e684f413, 1.10.3-112-g8bc69524a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working luajit
Projects
None yet
Development

No branches or pull requests

3 participants