mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
vim-patch:partial:9.0.0013: reproducing memory access errors can be difficult
Problem: Reproducing memory access errors can be difficult.
Solution: When testing, copy each line to allocated memory, so that valgrind
can detect accessing memory before and/or after it. Fix uncovered
problems.
fa4873ccfc
Since test_override() is N/A, enable ml_get_alloc_lines when ASAN is
enabled instead, so it also applies to functional tests.
Use xstrdup() to copy the line as ml_line_len looks hard to port.
Squash the test changes from patch 9.0.0016.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -4653,9 +4653,9 @@ int ins_copychar(linenr_T lnum)
|
||||
}
|
||||
|
||||
// try to advance to the cursor column
|
||||
validate_virtcol();
|
||||
line = ml_get(lnum);
|
||||
prev_ptr = line;
|
||||
validate_virtcol();
|
||||
|
||||
chartabsize_T cts;
|
||||
init_chartabsize_arg(&cts, curwin, lnum, 0, line, line);
|
||||
|
Reference in New Issue
Block a user