diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-01-02 21:17:27 +0100 | 
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2025-01-03 18:02:33 +0100 | 
| commit | fe87656f29e933b63f5d4dd03b3c0be3ed4ecf5f (patch) | |
| tree | 61ea20eb670f66c5d3062aad39e689715d36acf3 /test/functional/plugin/lsp_spec.lua | |
| parent | b52531a9cbbd1843490333452cd124e8be070690 (diff) | |
| download | rneovim-fe87656f29e933b63f5d4dd03b3c0be3ed4ecf5f.tar.gz rneovim-fe87656f29e933b63f5d4dd03b3c0be3ed4ecf5f.tar.bz2 rneovim-fe87656f29e933b63f5d4dd03b3c0be3ed4ecf5f.zip | |
fix(grid): grid_line_start NULL access with 'redrawdebug'
Problem:
This test causes a null pointer dereference:
    local proc = n.spawn_wait('-l', 'test/functional/fixtures/startup-fail.lua')
    RUN      T1565 startup -l Lua Lua-error sets Nvim exitcode: 241.00 ms OK
    ==================== File …/build/log/asan.13763 ====================
    = …/src/nvim/grid.c:389:12: runtime error: null pointer passed as argument 1, which is declared to never be null
    = /usr/include/string.h:61:62: note: nonnull attribute specified here
    =     0 0x55cc2d869762 in grid_line_start …/src/nvim/grid.c:389:5
    =     1 0x55cc2d8717ca in grid_clear …/src/nvim/grid.c:618:5
    =     2 0x55cc2dbe0f6f in msg_clr_eos_force …/src/nvim/message.c:3085:3
    =     3 0x55cc2dbbbdec in msg_clr_eos …/src/nvim/message.c:3061:5
    =     4 0x55cc2dbbae2c in msg_multiline …/src/nvim/message.c:281:9
    =     5 0x55cc2dbba2b4 in msg_keep …/src/nvim/message.c:364:5
    =     6 0x55cc2dbc4992 in emsg_multiline …/src/nvim/message.c:773:10
    =     7 0x55cc2dbc5d43 in semsg_multiline …/src/nvim/message.c:824:9
    =     8 0x55cc2d9c5945 in nlua_error …/src/nvim/lua/executor.c:158:5
    =     9 0x55cc2d9c89fd in nlua_exec_file …/src/nvim/lua/executor.c:1862:5
    =     10 0x55cc2d9f4d69 in main …/src/nvim/main.c:637:19
    =     11 0x7f319b62a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    =     12 0x7f319b62a28a in __libc_start_main csu/../csu/libc-start.c:360:3
    =     13 0x55cc2ced0f64 in _start (…/build/bin/nvim+0xc48f64) (BuildId: 309c83f8d74297c89719dae9c271dd8ec23e64c3)
Cause:
The tests use `redrawdebug=invalid` by default, but `default_grid_alloc`
skips calling `grid_alloc` when not `full_screen`.
Solution:
Check for `full_screen`.
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
0 files changed, 0 insertions, 0 deletions
