neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 4e130c1ee446f4389a8c76c5e81b53bff8b9193c
parent 39781be14baff508efd4f99c11786c4228ea2c8d
Author: Dan Pascu <danpascu777@gmail.com>
Date:   Fri, 20 Dec 2024 11:43:56 +0200

fix(vim.system): invalid MAX_TIMEOUT for 32-bit systems #31638

The maximum signed value on 32-bit systems is 2 ^ 31 - 1. When using 2 ^ 31 for
the default timeout, the value would overflow on such systems resulting in
a negative value, which caused a stack trace when calling wait() without
a timeout.
Diffstat:
Mruntime/lua/vim/_system.lua | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/runtime/lua/vim/_system.lua b/runtime/lua/vim/_system.lua @@ -79,7 +79,8 @@ function SystemObj:_timeout(signal) self:kill(signal or SIG.TERM) end -local MAX_TIMEOUT = 2 ^ 31 +-- Use max 32-bit signed int value to avoid overflow on 32-bit systems. #31633 +local MAX_TIMEOUT = 2 ^ 31 - 1 --- @param timeout? integer --- @return vim.SystemCompleted