]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lua resolve*(): fix a problem with JIT
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 8 Apr 2019 10:20:20 +0000 (12:20 +0200)
committerPetr Špaček <petr.spacek@nic.cz>
Thu, 11 Apr 2019 07:12:49 +0000 (09:12 +0200)
It caused crashes somewhere inside LuaJIT or the JIT-ed code.

daemon/lua/sandbox.lua.in

index 56af63cfaa1f22c0d366e5c50d54015581f25c5e..6996d479d01be2643432f3ebfcaf0bfd43d91187 100644 (file)
@@ -37,6 +37,7 @@ local function prep_resolve_cb(finish, init)
        if finish then
                -- Create callback for finalization
                finish_cb = ffi.cast('trace_callback_f', function (req)
+                       jit.off(true, true) -- JIT for (C -> lua)^2 nesting isn't allowed
                        req = kres.request_t(req)
                        finish(req.answer, req)
                        finish_cb:free()