Repository: neovim
Issue: Various treesitter related test failures on armel / armhf / i386
Labels: treesitter,platform:arm

### Problem

The Debian build of neovim is failing on [armel] / [armhf] / [i386] in various treesitter related tests. These happen to be the only 32-bit architectures that neovim is currently tested against.

[armel]: https://buildd.debian.org/status/fetch.php?pkg=neovim&arch=armel&ver=0.10.3-1&stamp=1736066993&raw=0
[armhf]: https://buildd.debian.org/status/fetch.php?pkg=neovim&arch=armhf&ver=0.10.3-1&stamp=1736068430&raw=0
[i386]: https://buildd.debian.org/status/fetch.php?pkg=neovim&arch=i386&ver=0.10.3-1&stamp=1736057447&raw=0

<details><summary>Test failure summary</summary>

```
FAILED   6 tests, listed below:
FAILED   test/functional/lua/comment_spec.lua @ 243: commenting toggle_lines() respects tree-sitter injections
test/functional/lua/comment_spec.lua:260: Expected objects to be the same.
Passed in:
(string) '-- print(1)'
Expected:
(string) '"print(1)'

stack traceback:
	test/functional/lua/comment_spec.lua:260: in function 'validate'
	test/functional/lua/comment_spec.lua:265: in function <test/functional/lua/comment_spec.lua:243>

FAILED   test/functional/lua/comment_spec.lua @ 452: commenting Operator respects tree-sitter injections
test/functional/lua/comment_spec.lua:470: Expected objects to be the same.
Passed in:
(string) '-- print(1)'
Expected:
(string) '"print(1)'

stack traceback:
	test/functional/lua/comment_spec.lua:470: in function 'validate'
	test/functional/lua/comment_spec.lua:475: in function <test/functional/lua/comment_spec.lua:452>

FAILED   test/functional/lua/comment_spec.lua @ 503: commenting Operator recomputes local 'commentstring' based on cursor position
test/functional/lua/comment_spec.lua:520: Expected objects to be the same.
Passed in:
(string) '  -- print(1)'
Expected:
(string) '  "print(1)'

stack traceback:
	test/functional/lua/comment_spec.lua:520: in function <test/functional/lua/comment_spec.lua:503>

FAILED   test/functional/lua/comment_spec.lua @ 569: commenting Current line respects tree-sitter injections
test/functional/lua/comment_spec.lua:587: Expected objects to be the same.
Passed in:
(table: 0xf16c0be8) {
  [1] = '"set background=dark'
  [2] = 'lua << EOF'
 *[3] = '-- print(1)'
  [4] = 'EOF' }
Expected:
(table: 0xf16c0b70) {
  [1] = '"set background=dark'
  [2] = 'lua << EOF'
 *[3] = '"print(1)'
  [4] = 'EOF' }

stack traceback:
	test/functional/lua/comment_spec.lua:587: in function <test/functional/lua/comment_spec.lua:569>

FAILED   test/functional/lua/comment_spec.lua @ 629: commenting Textobject respects tree-sitter injections
test/functional/lua/comment_spec.lua:648: Expected objects to be the same.
Passed in:
(table: 0xf591f1f0) {
  [1] = 'lua << EOF'
 *[2] = 'EOF' }
Expected:
(table: 0xf591f178) {
  [1] = 'lua << EOF'
 *[2] = '-- print(1)'
  [3] = '-- print(2)'
  [4] = 'EOF' }

stack traceback:
	test/functional/lua/comment_spec.lua:648: in function <test/functional/lua/comment_spec.lua:629>

FAILED   test/functional/treesitter/language_spec.lua @ 138: treesitter language API retrieve the node given a range
test/functional/treesitter/language_spec.lua:149: Expected objects to be the same.
Passed in:
(string) 'nil'
Expected:
(string) '<node primitive_type>'

stack traceback:
	test/functional/treesitter/language_spec.lua:149: in function <test/functional/treesitter/language_spec.lua:138>

ERROR    4 errors, listed below:
ERROR    test/functional/treesitter/language_spec.lua @ 110: treesitter language API retrieve the tree given a range
test/functional/testnvim.lua:127: Error executing lua: [string "<nvim>"]:1: attempt to index global 'tree' (a nil value)
stack traceback:
	[string "<nvim>"]:1: in main chunk

stack traceback:
	test/functional/testnvim.lua:127: in function 'exec_lua'
	test/functional/treesitter/language_spec.lua:121: in function <test/functional/treesitter/language_spec.lua:110>

ERROR    test/functional/treesitter/language_spec.lua @ 124: treesitter language API retrieve the tree given a range when range is out of bounds relative to buffer
test/functional/testnvim.lua:127: Error executing lua: [string "<nvim>"]:1: attempt to index global 'tree' (a nil value)
stack traceback:
	[string "<nvim>"]:1: in main chunk

stack traceback:
	test/functional/testnvim.lua:127: in function 'exec_lua'
	test/functional/treesitter/language_spec.lua:135: in function <test/functional/treesitter/language_spec.lua:124>

ERROR    test/functional/treesitter/node_spec.lua @ 19: treesitter node API double free tree
test/functional/testnvim.lua:127: Error executing lua: [string "<nvim>"]:2: attempt to index a nil value
stack traceback:
	[string "<nvim>"]:2: in main chunk

stack traceback:
	test/functional/testnvim.lua:127: in function 'exec_lua'
	test/functional/treesitter/node_spec.lua:21: in function <test/functional/treesitter/node_spec.lua:19>

ERROR    test/functional/treesitter/node_spec.lua @ 44: treesitter node API get_node() with lang given
test/functional/testnvim.lua:127: Error executing lua: ...ucible-path/neovim-0.10.3/runtime/lua/vim/treesitter.lua:182: attempt to index local 'node' (a nil value)
stack traceback:
	...ucible-path/neovim-0.10.3/runtime/lua/vim/treesitter.lua:182: in function 'get_range'
	...ucible-path/neovim-0.10.3/runtime/lua/vim/treesitter.lua:217: in function <...ucible-path/neovim-0.10.3/runtime/lua/vim/treesitter.lua:210>

stack traceback:
	test/functional/testnvim.lua:127: in function 'lua_eval'
	test/functional/treesitter/node_spec.lua:54: in function <test/functional/treesitter/node_spec.lua:44>


 44 SKIPPED TESTS
 6 FAILED TESTS
 4 ERRORS
```
</details>

### Steps to reproduce

make
make functionaltest TEST_FILE=test/functional/treesitter/node_spec.lua

### Expected behavior

Tests pass

### Nvim version (nvim -v)

v0.10.3 and v0.11.0-dev-1649+gc47496791a

### Vim (not Nvim) behaves the same?

n/a

### Operating system/version

Debian Trixie

### Terminal name/version

n/a

### $TERM environment variable

n/a

### Installation

build from repo