I am starting to look in to Odin and wanted to try the language server, trying out the latest release from GitHub, I can easily crash the language server by simply starting the server and pressing enter, like so:
% ./ols-x86_64-darwin
/Users/runner/work/ols/ols/src/server/requests.odin(175:35) Index -1 is out of range 0..<1
zsh: illegal hardware instruction ./ols-x86_64-darwin
I think this is the fix for the issue, but can't confirm since I am unable to compile ols with the version of Odin shipped with homebrew (odin version dev-2023-08:9453b238)
Sure it would fix that case. But the client would never send that. I'll add it for robustness, but it should not make any difference for actual LSP clients.
Hi!
I am starting to look in to Odin and wanted to try the language server, trying out the latest release from GitHub, I can easily crash the language server by simply starting the server and pressing enter, like so:
I think this is the fix for the issue, but can't confirm since I am unable to compile ols with the version of Odin shipped with homebrew (odin version dev-2023-08:9453b238)
Proposed fix: