mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
cb757f2663
Problem: Build is not reproducible, because generated source files (.c/.h/) are not deterministic, mostly because Lua pairs() is unordered by design (for security). https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671 https://www.lua.org/manual/5.1/manual.html#pdf-next > The order in which the indices are enumerated is not specified [...] > >> The hardening of the VM deliberately randomizes string hashes. This in >> turn randomizes the iteration order of tables with string keys. Solution: - Update the code generation scripts to be deterministic. - That is only a partial solution: the exported function (funcs_metadata.generated.h) and ui event (ui_events_metadata.generated.h) metadata have some mpack'ed tables, which are not serialized deterministically. - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0) that preserves table order. - Longer-term we should change the mpack'ed data structure so it no longer uses tables keyed by strings. Closes #20124 Co-Authored-By: dundargoc <gocdundar@gmail.com> Co-Authored-By: Arnout Engelen <arnout@bzzt.net> |
||
---|---|---|
.. | ||
api_spec.lua | ||
buffer_updates_spec.lua | ||
command_line_completion_spec.lua | ||
commands_spec.lua | ||
diagnostic_spec.lua | ||
ffi_spec.lua | ||
filetype_spec.lua | ||
fs_spec.lua | ||
help_spec.lua | ||
highlight_spec.lua | ||
inspector_spec.lua | ||
json_spec.lua | ||
loop_spec.lua | ||
luaeval_spec.lua | ||
mpack_spec.lua | ||
overrides_spec.lua | ||
runtime_spec.lua | ||
secure_spec.lua | ||
spell_spec.lua | ||
thread_spec.lua | ||
ui_event_spec.lua | ||
ui_spec.lua | ||
uri_spec.lua | ||
vim_spec.lua | ||
xdiff_spec.lua |