aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | | | | | | coverity/166184: Check length of str, not termJames McCoy2017-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32396b5879b429def1c48948069c55366d41b9be add length checks to TERMINAL_FAMILY/STARTS_WITH to ensure memcmp() wouldn't read past the end of the string. However, "term" was copy/pasted from TERMINAL_FAMILY so STARTS_WITH() was unnecessarily reading the, potentially NULL, term variable.
* | | | | | | | Merge pull request #7143 from jamessan/log_callstack_to_fileJames McCoy2017-08-11
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | log: Add log_callstack_to_file()
| * | | | | | | | log: Add log_callstack_to_file()James McCoy2017-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it trivial to log the callstack to, e.g., stderr, which can simplify debug cycles.
* | | | | | | | | vim-patch:8.0.0165 (#7132)KunMing Xie2017-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Ubsan warns for integer overflow. Solution: Swap two conditions. (Dominique Pelle) https://github.com/vim/vim/commit/f446b48ff0bffae2b453cd4f9e3c25dfe363d29d
* | | | | | | | | buf_write(): handle NULL fname on non-unixJustin M. Keyes2017-08-10
| | | | | | | | |
* | | | | | | | | os_stat: return ENOENT on NULL filename argJames McCoy2017-08-10
| |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #4370 Explication: In the backtrace in #4370, we see that `buf_write()` was called with non-NULL `fname` and `sfname` arguments, but they've since _become_ NULL. #7 0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go", sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0, forceit=0, reset_changed=1, filtering=0) at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576 This is most likely due to the code that restores those values from `buf`, which happens just before the fatal call to `os_fileinfo` ```c /* * The autocommands may have changed the name of the buffer, which may * be kept in fname, ffname and sfname. */ if (buf_ffname) ffname = buf->b_ffname; if (buf_sfname) sfname = buf->b_sfname; if (buf_fname_f) fname = buf->b_ffname; if (buf_fname_s) fname = buf->b_sfname; ``` It's worth noting that at this point `ffname` is still non-NULL, so it _could_ be used. However, our current code is purely more strict than Vim in this area, which has caused us problems before (e.g., `getdigits()`). The commentary for `struct file_buffer` clearly indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be NULL: ```c /* * b_ffname has the full path of the file (NULL for no name). * b_sfname is the name as the user typed it (or NULL). * b_fname is the same as b_sfname, unless ":cd" has been done, * then it is the same as b_ffname (NULL for no name). */ char_u *b_ffname; /* full path file name */ char_u *b_sfname; /* short file name */ char_u *b_fname; /* current file name */ ``` Vim directly calls `stat(2)` which, although it is annotated to tell the compiler that the path argument is non-NULL, does handle a NULL pointer by returning a `-1` value and setting `errno` to `EFAULT`. This satisfies Vim's check, since it treats any `-1` return from `stat(2)` to mean the file doesn't exist (at least in this code path). Note that Vim's mch_stat() implementations on win32 and solaris clearly cannot accept NULL `name`. But the codepaths that call mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
* | | | | | | | Merge #7134 from justinmk/oldtest-tmpdirJustin M. Keyes2017-08-09
|\ \ \ \ \ \ \ \
| * | | | | | | | oldtest: test_cmdline: Complete "Xtestf" so "Xtest-tmpdir" isn't matchedJames McCoy2017-08-09
| | | | | | | | |
| * | | | | | | | oldtest: use TMPDIRJustin M. Keyes2017-08-09
| |/ / / / / / /
* / / / / / / / buf_write(): wrong argument to os_fileinfo_hardlinksJustin M. Keyes2017-08-09
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken in ye olde refactor from 2014: e85fe0957d40080f43cbfcbe9eb8864475325b09 References #4370
* | | | | | | vim-patch:8.0.0149 (#7127)KunMing Xie2017-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ":earlier" and ":later" do not work after startup or reading the undo file. Solution: Use absolute time stamps instead of relative to the Vim start time. (Christian Brabandt, Pavel Juhas, closes vim/vim#1300, closes vim/vim#1254) https://github.com/vim/vim/commit/cbd4de44e8d08fba3c09eb40ad6e36e83faf020a
* | | | | | | vim-patch:8.0.0111 (#7090)KunMing Xie2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The :history command is not tested. Solution: Add tests. (Dominique Pelle) https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
* | | | | | | vim-patch:8.0.0147 #7121ckelsel2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: searchpair() does not work when 'magic' is off. (Chris Paul) Solution: Add \m in the pattern. (Christian Brabandt, closes vim/vim#1341) https://github.com/vim/vim/commit/6e450a57541676036203a72d40b2e604e938371e
* | | | | | | vim-patch:8.0.0143 (#7120)KunMing Xie2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Line number of current buffer in getbufinfo() is wrong. Solution: For the current buffer use the current line number. (Ken Takata) https://github.com/vim/vim/commit/f845b87f2b3a45cbee160e28d7a3f50e54054809
* | | | | | | vim-patch:8.0.0137 (#7119)KunMing Xie2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When 'maxfuncdepth' is set above 200 the nesting is limited to 200. (Brett Stahlman) Solution: Allow for Ex command recursion depending on 'maxfuncdepth'. https://github.com/vim/vim/commit/777b30f827bcbe10a40640b1bf0361cb93a16be1
* | | | | | | vim-patch:8.0.0086 (#7118)lonerover2017-08-06
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot add a comment after ":hide". (Norio Takagi) Solution: Make it work, add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/2256c9947164229c0960803e2a2992b793c23298
* | | | | | input: skip dialogs if no UI is activeJustin M. Keyes2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat dialogs in the same way as "silent mode" (`nvim -es`). References #1984 References #3901
* | | | | | win_defs.h: redefine RGB macro after undefiningJustin M. Keyes2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if os_defs.h was included after macros.h then win_defs.h would undefine our own RGB macro. vim-patch:8.0.0146
* | | | | | build: silence maybe-uninitialized warningJustin M. Keyes2017-08-06
| | | | | | | | | | | | | | | | | | | | | | | | False positive. From C:\msys64\mingw64\bin\gcc.exe (appveyor CI)
* | | | | | clint: allow starting brace after `enum`Justin M. Keyes2017-08-06
| | | | | |
* | | | | | terminal: block redraw during c_CTRL-DJustin M. Keyes2017-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the normal wildmenu, the CTRL-D wild-list is not restored by statusline redraw. (Semantics: ^D is controlled by 'wildoptions' option, so it's in the "wild..." family.) TODO: externalize the c_CTRL-D wild-list.
* | | | | | win_redr_status(): skip if wildmenu is showingJustin M. Keyes2017-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This might be too coarse, but it passes all tests ... A more nuanced approach might be: only skip the windows whose statuslines are overwritten by the wildmenu. Closes #2255 Closes #7108 vim-patch:8.0.0710 N/A because of the changes in this commit.
* | | | | | vim-patch:8.0.0134 (#7109)KunMing Xie2017-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Null pointer access reported by UBsan. Solution: Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/c4bfedabe057c05f09a455a5851089e177fa9c00 src/nvim/ex_cmds.c have been merged by someone. while version.c remain unmerged.
* | | | | | test/oldtest: avoid delete() on files used by a subprocessJustin M. Keyes2017-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should avoid the hangs observed in the TSAN build on travis CI. TODO: Find the root cause ...
* | | | | | vim-patch:8.0.0133 (#7107)KunMing Xie2017-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "2;'(" causes ml_get errors in an empty buffer. (Dominique Pelle) Solution: Check the cursor line earlier. https://github.com/vim/vim/commit/fe38b494fff56cd9b2fcaeef26a8fd7b6557d69c
* | | | | | fix lint errorlonerover2017-08-04
| | | | | |
* | | | | | vim-patch:8.0.0081lonerover2017-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Inconsistent function names. Solution: Rename do_cscope to ex_cscope. Clean up comments. https://github.com/vim/vim/commit/d4db7719bdfbc54df396eac08d8cbb2389feacf4
* | | | | | Revert "vim-patch:8.0.0133 (#7107)"Justin M. Keyes2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eb40b7ec404e8651137513ced43d503bc6656f17. The change caused this error on QuickBuild: INFO - # test/functional/core/job_spec.lua @ 668: pty process teardown does not prevent/delay exit. #4798 #4900 INFO - not ok 321 - pty process teardown does not prevent/delay exit. #4798 #4900 INFO - # test/functional/core/job_spec.lua @ 668 INFO - # Failure message: ./test/functional/ui/screen.lua:302: Row 1 did not match. INFO - # Expected: INFO - # |* | INFO - # |[Process exited 0] | INFO - # | | INFO - # | | INFO - # | | INFO - # |-- TERMINAL -- | INFO - # Actual: INFO - # |*E575: Error while reading ShaD| INFO - # |a file: mark entry at position| INFO - # | 92 has invalid line number | INFO - # |Press ENTER or type command to| INFO - # | continue | INFO - # |-- TERMINAL -- | INFO - # INFO - # To print the expect() call that would assert the current screen state, use INFO - # screen:snaphot_util(). In case of non-deterministic failures, use INFO - # screen:redraw_debug() to show all intermediate screen states. INFO - # stack traceback: INFO - # ./test/functional/ui/screen.lua:302: in function 'wait' INFO - # ./test/functional/ui/screen.lua:216: in function 'expect' INFO - # test/functional/core/job_spec.lua:677: in function <test/functional/core/job_spec.lua:668>
* | | | | | vim-patch:8.0.0133 (#7107)KunMing Xie2017-08-02
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | Problem: "2;'(" causes ml_get errors in an empty buffer. (Dominique Pelle) Solution: Check the cursor line earlier. https://github.com/vim/vim/commit/fe38b494fff56cd9b2fcaeef26a8fd7b6557d69c
* | | | | Merge pull request #7104 from jamessan/run-oldtests-under-headlessJames McCoy2017-07-30
|\ \ \ \ \ | | | | | | | | | | | | oldtests: Run nvim using --headless to avoid requesting user input
| * | | | | oldtests: Run nvim using --headless to avoid requesting user inputJames McCoy2017-07-30
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain functions (e.g. feedkeys(…, 'x!') and input()) will attempt to read from stdin, which shouldn't be expected to work during oldtests. In Debian/Ubuntu's build environment, it explicitly can't work because /dev/null is redirected to stdin, which causes read_error_exit() to exit. Running oldtests with --headless prevents nvim from setting up its input handling, thus avoiding the problem altogether. Reference #6794
* | | | | vim-patch:8.0.0498 (#7103)Justin M. Keyes2017-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Two autocmd tests are skipped on MS-Windows. Solution: Make the test pass on MS-Windows. Write the messages in a file instead of getting the output of system(). https://github.com/vim/vim/commit/e94260f3582cf928cc59e792b3b6ede57794a4a6
* | | | | options: remove ghost of `:set termcap` (#7102)Justin M. Keyes2017-07-31
|/ / / / | | | | | | | | Closes #6763
* | | | Merge #7100 from justinmk/tui-colorsJustin M. Keyes2017-07-30
|\ \ \ \
| * | | | tui: fix truecolor in libvte, tmux #7037DarkDefender2017-07-30
| | | | | | | | | | | | | | | | | | | | Closes #7041
* | | | | vim-patch: 8.0.00{12, 46, 93} (#7098)lonerover2017-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.0.0012 Problem: Typos in comments. Solution: Change "its" to "it's". (Matthew Brener, closes vim/vim#1088) https://github.com/vim/vim/commit/9af418427652562384744648d7d173a4bfebba95 vim-patch:8.0.0046 version.c: mark 8.0.0046 applied vim-patch:8.0.0063 version.c: mark 8.0.0063 as NA patch
* | | | | build: linux does not always have execinfo.h (#7101)Justin M. Keyes2017-07-30
|/ / / / | | | | | | | | Closes #7099
* | | | vim-patch:8.0.0124 #7092ckelsel2017-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Internal error for assert_inrange(1, 1). Solution: Adjust number of allowed arguments. (Dominique Pelle) https://github.com/vim/vim/commit/3421566376b5723213af502bd3c2b9debe025ef1
* | | | vim-patch:8.0.0119 (#7091)KunMing Xie2017-07-30
| | | | | | | | | | | | | | | | | | | | | | | | Problem: No test for using CTRL-R on the command line. Solution: Add a test. (Dominique Pelle) And some more. https://github.com/vim/vim/commit/21efc3633edb58809c5dd89b025d34d7002e731c
* | | | Merge #7093 from justinmk/fix-qbJustin M. Keyes2017-07-30
|\ \ \ \
| * | | | test/legacy: avoid TSAN CI build hangJustin M. Keyes2017-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This delete() sometimes hangs the TSAN build. Work around it by using a unique filename. Do it at the start instead of the end, for hygiene (though it doesn't actually matter on CI, it helps local dev).
* | | | | vim-patch:8.0.0020Jurica Bradaric2017-07-29
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Problem: The regexp engines are not reentrant. Solution: Add regexec_T and save/restore the state when needed. https://github.com/vim/vim/commit/6100d02aab7c8294b581cb299250eea164b50e9d
* | | | coverity/155506: null dereference (#7089)Justin M. Keyes2017-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity warning is a false positive: if rbuffer_read_ptr() returns NULL then `cnt` is zero. Revert 76ea97c809e50fccc5ca6615943ac6da1db1e030 (which caused the TSan build to hang often--possibly because of the missing ui_flush()). Instead, modify out_data_append_to_screen() to check for NULL. ref #6862
* | | | vim-patch:8.0.0100 (#7085)KunMing Xie2017-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.0.0100 Problem: Options that are a file name may contain non-filename characters. Solution: Check for more invalid characters. https://github.com/vim/vim/commit/319afe3804741db5a6c188bd69535fa7ed044c62
* | | | menu_get(): docJustin M. Keyes2017-07-28
| | | |
* | | | viml: introduce menu_get() function #6322Matthieu Coudron2017-07-28
| | | | | | | | | | | | | | | | menu_get({path}, {modes}). See :h menu_get.
* | | | vim-patch:8.0.0088 (#7080)KunMing Xie2017-07-27
| | | | | | | | | | | | | | | | | | | | | | | | Problem: When a test fails in Setup or Teardown the problem is not reported. Solution: Add a try/catch. (Hirohito Higashi) https://github.com/vim/vim/commit/cc28e2d05d05552d8b72a520be8a193f3d9822d4
* | | | Merge pull request #7069 from jbradaric/vim-8.0.0034James McCoy2017-07-26
|\ \ \ \ | | | | | | | | | | vim-patch:8.0.0034
| * | | | vim-patch:8.0.0034Jurica Bradaric2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No completion for ":messages". Solution: Complete "clear" argument. (Hirohito Higashi) https://github.com/vim/vim/commit/9e507ca8a3e1535e62de4bd86374b0fcd18ef5b8
* | | | | Merge pull request #7071 from jbradaric/vim-8.0.0075James McCoy2017-07-26
|\ \ \ \ \ | | | | | | | | | | | | vim-patch:8.0.0075