| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
Problem: Expanding to local dir after homedir keeps "~/".
Solution: Adjust modify_fname(). (Christian Brabandt, closes vim/vim#6205,
closes vim/vim#5979)
https://github.com/vim/vim/commit/0e390f40e944036fb558a63b91238cfda128d95f
|
|
|
| |
* refactor: reduce number of explicit char casts
|
|
|
|
|
|
|
|
|
| |
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactor: format with uncrustify
* fixup(dundar): fix functions comments
* fixup(dundar): remove space between variable and ++/--
* fixup(dundar): better workaround for macro attributes
This is done to be able to better use uncrustify rules for macros
* fixup(justin): make preprocessors follow neovim style guide
|
|
|
|
| |
* fix function parameter comments
* remove space after star in function names
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Note: the reason for removing them is not that there after this refactor
is no use of them, but rather that having them available is an
anti-pattern: they manange an _extra_ heap allocation which has
nothing to do with the functionality of the map itself (khash
manages the real buffers internally). In case there happens to
be a reason to allocate the map structure itself later, this
should be made explicit using xcalloc/xfree calls.
|
|
|
|
|
|
| |
Close https://github.com/neovim/neovim/issues/8614
Use uv_os_homedir and current directory as backup if HOME env is not set.
Allocate homedir only if var is not NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Seems like redundant env var separators (";" on Windows) in $PATH can
cause weird behavior. From #7377:
> After some time, system(['win32yank', '-o']) and system('win32yank -o')
> start returning different results: specifically first returns an
> empty string.
>
> 1. $PATH weirdly contains double semicolon followed by path to the
> “installation directory” (unpacked directory from archive).
> 2. If I run `let $PATH=substitute($PATH, ';;', ';', 'g')` the problem is fixed.
close #7377
ref 224f99b85d311ebd31451db13b66e4a3c7e51938
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
to modify the environment of the launched job.
|
|
|
| |
unibi_from_term calls getenv internally, so exclusive control is required.
|
|
|
|
|
| |
ELOG may call os_getenv and os_setenv internally. In that case, a
deadlock occurs.
|
|
|
|
| |
This reverts commit 278c5d452c2cbc436a9cc317407ae6021a226c3a.
|
|
|
|
|
|
|
|
| |
Problem: ":lang messages en_US.UTF-8" no longer overrides the language
detected from the environment (at startup).
Solution: In os_setenv, special-case "LC_ALL", "LANG", et al. to use
putenv_s instead of uv_os_setenv.
fixes #11045
|
|
|
|
|
|
| |
Problem: May free memory twice when out of memory.
Solution: Check that backslash_halve_save() returns a different pointer.
(Dominique Pelle, closes vim/vim#4847)
https://github.com/vim/vim/commit/f1552d07d715b437d941659479942c2543b02bd4
|
|
|
|
|
|
|
|
|
| |
- take a size parameter
- return libuv error code
- handle error in caller only (avoid redundant messages)
https://github.com/libuv/libuv/commit/53995a3825d23eacd01e2bcfa35642c4a188d32b
https://github.com/libuv/libuv/commit/4c945f49365ab4d6e1b07bf0ef2893455dc04622
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- In appimage, the message catalog is not used because there is no
message catalog in LOCALE_INSTALL_DIR. Therefore, change to
exepath/../share/locale instead of LOCALE_INSTALL_DIR.
- The old vim style($runtime/lang) is no longer used. Thus all relevant
code is removed.
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Windows: `set FOO=` deletes environment variable FOO, and there is no
way to set empty string expect by calling the API.
- Vim-compatible: `:let $FOO=""` deletes the environment variable.
- See also Test_WindowsHome().
ref: https://github.com/neovim/neovim/pull/10657#issuecomment-516368089
|
| |
| |
| |
| | |
Vim-compatible behavior for a Windows edge case.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
os_env_exists() fails on MSVC build:
os_env_exists:104: uv_os_getenv(EMPTY_VAR) failed: -4094 UNKNOWN
- Revert 396a3945c4eba733b3a99a7ded217af83a400791
- HACK: Windows: return TRUE if uv_os_getenv() returns UV_UNKNOWN, until
libuv bug is fixed: https://github.com/libuv/libuv/issues/2413
ref https://github.com/neovim/neovim/commit/396a3945c4eba733b3a99a7ded217af83a400791#r34642361
|
| |
| |
| |
| |
| | |
- use os_getenvname_at_index / os_getenv
- f_getenv: empty (*p == NUL) is not null (undefined)
|
|/ |
|
|
|
|
|
|
| |
Problem: Expanding a file name "~" results in $HOME. (Aidan Shafran)
Solution: Change "~" to "./~" before expanding. (closes vim/vim#3072)
https://github.com/vim/vim/commit/00136dc321586800986e8f743c2f108f5eecbf92
|
|\
| |
| |
| | |
fixes #9681
|
|/
|
|
|
|
|
| |
Since uv_os_setenv uses SetEnvironmentVariableW, _wenviron is no
updated. As a result, inconsistency occurs in completion of environment
variable names. Change to use GetEnvironmentStaringsW instead of
_wenviron to solve it.
|
|
|
|
| |
fixes #9655
|
|
|
|
|
|
|
|
|
|
|
| |
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
(`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
anything, so even its keys must be memory-managed by the caller.
closes #8398
closes #9267
|
|
|
|
|
|
|
|
|
|
| |
It's reported that the Windows widechar variants do automatically
convert from the current codepage to UTF16, which is very helpful. So
the "widechar" impls are a good direction. But libuv v1.12 does that
for us, so the next commit will use that instead.
ref #8398
ref #9267
|
| |
|
|
|
|
|
| |
_putenv_s variant was left over from 810d31a43001, should have been
removed in cd5b1315757e.
|
|\ |
|
| | |
|
|/
|
|
|
|
| |
Problem: Needlessly searching for tilde in string.
Solution: Only check the first character. (James McCoy, closes vim/vim#3734)
https://github.com/vim/vim/commit/ef0a1d5ed3566b91143d30ae9de3240f47c6e282
|
|
|
|
|
|
| |
Problem: Invalid memory access with nonsensical script.
Solution: Check "dstlen" being positive. (Dominique Pelle)
https://github.com/vim/vim/commit/1c864093f93b0066de25d6c0ddf03a6bc6b1c870
|
|
|
|
|
|
|
|
|
| |
Problem: MS-Windows: Problem with $HOME when is was set internally.
Solution: Only use the $HOME default internally. (Yasuhiro Matsumoto, closes
vim/vim#2013)
https://github.com/vim/vim/commit/48340b62e812dc9280f621a2eb6db76d43555c66
Restore vim_getenv() behaviour for $HOME on Windows.
|
|
|
|
| |
wchar_t has better cross-platform support and seems to fix an issue
on MinGW when building with `-std=c99`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ref be68f218ffef
[OLDTEST] Running test_options
Failed: F /tests/oldtests|test_options :: Nvim exited with non-zero code
-en travis_fold:start:-tests-oldtests-test-options
=================================================================
==26191==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x621000067900 at pc 0x0000004768bd bp 0x7ffe6bd02de0 sp 0x7ffe6bd02580
READ of size 4096 at 0x621000067900 thread T0
0 0x4768bc in __interceptor_getpwnam /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1726:3
1 0x12847c5 in os_get_user_directory /home/travis/build/neovim/neovim/build/../src/nvim/os/users.c:82:8
2 0x125a3e3 in expand_env_esc /home/travis/build/neovim/neovim/build/../src/nvim/os/env.c:380:25
3 0x1257fdb in expand_env_save_opt /home/travis/build/neovim/neovim/build/../src/nvim/os/env.c:255:3
4 0x1291b77 in gen_expand_wildcards /home/travis/build/neovim/neovim/build/../src/nvim/path.c:1195:13
5 0x129e2e7 in expand_wildcards /home/travis/build/neovim/neovim/build/../src/nvim/path.c:2018:12
6 0x129e193 in expand_wildcards_eval /home/travis/build/neovim/neovim/build/../src/nvim/path.c:1986:11
7 0xc2ddc3 in ExpandFromContext /home/travis/build/neovim/neovim/build/../src/nvim/ex_getln.c:4685:11
8 0xc29412 in ExpandOne /home/travis/build/neovim/neovim/build/../src/nvim/ex_getln.c:3775:9
9 0x931364 in f_expand /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:8257:32
10 0x811954 in call_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6373:11
11 0x8256b8 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6119:11
12 0x8ad6a1 in eval7 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:4217:15
13 0x8a9c6b in eval6 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3914:7
14 0x8a797f in eval5 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3765:7
15 0x8a319f in eval4 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3502:7
16 0x8a263c in eval3 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3420:7
17 0x8a1adc in eval2 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3351:7
18 0x809b21 in eval1 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3278:7
19 0x824f24 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6092:9
20 0x81e674 in ex_call /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:2726:9
21 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
22 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
23 0x845232 in call_user_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:21396:3
24 0x81127b in call_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6358:11
25 0x8256b8 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6119:11
26 0x81e674 in ex_call /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:2726:9
27 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
28 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
29 0x8645f1 in ex_execute /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:19541:7
30 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
31 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
32 0x845232 in call_user_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:21396:3
33 0x81127b in call_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6358:11
34 0x8256b8 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6119:11
35 0x81e674 in ex_call /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:2726:9
36 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
37 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
38 0xb19f2d in do_source /home/travis/build/neovim/neovim/build/../src/nvim/ex_cmds2.c:2973:3
39 0xb16580 in cmd_source /home/travis/build/neovim/neovim/build/../src/nvim/ex_cmds2.c:2718:14
40 0xb16677 in ex_source /home/travis/build/neovim/neovim/build/../src/nvim/ex_cmds2.c:2699:3
41 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
42 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
43 0xb362c5 in do_cmdline_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:278:10
44 0xe8e3a3 in exe_commands /home/travis/build/neovim/neovim/build/../src/nvim/main.c:1705:5
45 0xe7bbba in main /home/travis/build/neovim/neovim/build/../src/nvim/main.c:518:5
46 0x2b0e17bd1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
47 0x44dcfb in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x44dcfb)
0x621000067900 is located 0 bytes to the right of 4096-byte region [0x621000066900,0x621000067900)
allocated by thread T0 here:
0 0x4eeed3 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3
1 0xf87981 in try_malloc /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:87:15
2 0xf87ba9 in xmalloc /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:121:15
3 0x1257f6f in expand_env_save_opt /home/travis/build/neovim/neovim/build/../src/nvim/os/env.c:254:15
4 0x1291b77 in gen_expand_wildcards /home/travis/build/neovim/neovim/build/../src/nvim/path.c:1195:13
5 0x129e2e7 in expand_wildcards /home/travis/build/neovim/neovim/build/../src/nvim/path.c:2018:12
6 0x129e193 in expand_wildcards_eval /home/travis/build/neovim/neovim/build/../src/nvim/path.c:1986:11
7 0xc2ddc3 in ExpandFromContext /home/travis/build/neovim/neovim/build/../src/nvim/ex_getln.c:4685:11
8 0xc29412 in ExpandOne /home/travis/build/neovim/neovim/build/../src/nvim/ex_getln.c:3775:9
9 0x931364 in f_expand /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:8257:32
10 0x811954 in call_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6373:11
11 0x8256b8 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6119:11
12 0x8ad6a1 in eval7 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:4217:15
13 0x8a9c6b in eval6 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3914:7
14 0x8a797f in eval5 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3765:7
15 0x8a319f in eval4 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3502:7
16 0x8a263c in eval3 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3420:7
17 0x8a1adc in eval2 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3351:7
18 0x809b21 in eval1 /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:3278:7
19 0x824f24 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6092:9
20 0x81e674 in ex_call /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:2726:9
21 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
22 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
23 0x845232 in call_user_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:21396:3
24 0x81127b in call_func /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6358:11
25 0x8256b8 in get_func_tv /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:6119:11
26 0x81e674 in ex_call /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:2726:9
27 0xb4db73 in do_one_cmd /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:2238:5
28 0xb30119 in do_cmdline /home/travis/build/neovim/neovim/build/../src/nvim/ex_docmd.c:602:20
29 0x8645f1 in ex_execute /home/travis/build/neovim/neovim/build/../src/nvim/eval.c:19541:7
SUMMARY: AddressSanitizer: heap-buffer-overflow /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1726:3 in __interceptor_getpwnam
Shadow bytes around the buggy address:
0x0c4280004ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280004ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280004ef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280004f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280004f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4280004f20:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4280004f30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4280004f40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4280004f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4280004f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4280004f70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==26191==ABORTING
Failed: E /tests/oldtests|logs :: Runtime errors detected.
Job exited with code 1
Screen (23 lines)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f
Signed-off-by: Michael Schupikov <michael@schupikov.de>
|
| |
|
| |
|
| |
|