mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
afa99f42b3
fs_init() must be called before early_init() in init/helpers.lua
If I run 'make unittest' on my Mac (macOS 10.14/Mojave or 12/Big Sur, intel
CPU), every test produce a core dump.
Call sequence in the core is:
early_init() main.c:197
set_init_1() option.c:508
runtimepath_default() runtime.c:1205
get_lib_dir() runtime.c:1175
os_isdir() fs.c:137
os_getperm() fs.c:777
os_stat() fs.c:761
fs_loop_lock() fs.c:72
uv_mutex_lock(&fs_loop_mutex) thread.c:352
abort()
.deps/build/src/libuv/src/unix/thread.c:
void uv_mutex_lock(uv_mutex_t* mutex) {
if (pthread_mutex_lock(mutex))
abort(); // line 352
}
So pthread_mutex_lock(&fs_loop_mutex) failed. The reason seems to be simple.
fs_init() was not called and fs_loop_mutex has not been initialized. fs_init()
was moved out from early_init() in main.c by
|
||
---|---|---|
.. | ||
api | ||
charset | ||
eval | ||
fixtures | ||
os | ||
viml | ||
buffer_spec.lua | ||
fileio_spec.lua | ||
formatc.lua | ||
garray_spec.lua | ||
helpers.lua | ||
keycodes_spec.lua | ||
marktree_spec.lua | ||
mbyte_spec.lua | ||
memory_spec.lua | ||
message_spec.lua | ||
multiqueue_spec.lua | ||
option_spec.lua | ||
path_spec.lua | ||
preload.lua | ||
preprocess.lua | ||
profile_spec.lua | ||
rbuffer_spec.lua | ||
search_spec.lua | ||
set.lua | ||
strings_spec.lua | ||
tempfile_spec.lua | ||
testtest_spec.lua | ||
tui_spec.lua | ||
undo_spec.lua |