{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/2487","labels_url":"https://api.github.com/repos/neovim/neovim/issues/2487/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2487/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/2487/events","html_url":"https://github.com/neovim/neovim/issues/2487","id":70297636,"number":2487,"title":"Dead lock after tab to autocomple `!./li`","user":{"login":"philix","id":207795,"avatar_url":"https://avatars.githubusercontent.com/u/207795?v=3","gravatar_id":"","url":"https://api.github.com/users/philix","html_url":"https://github.com/philix","followers_url":"https://api.github.com/users/philix/followers","following_url":"https://api.github.com/users/philix/following{/other_user}","gists_url":"https://api.github.com/users/philix/gists{/gist_id}","starred_url":"https://api.github.com/users/philix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philix/subscriptions","organizations_url":"https://api.github.com/users/philix/orgs","repos_url":"https://api.github.com/users/philix/repos","events_url":"https://api.github.com/users/philix/events{/privacy}","received_events_url":"https://api.github.com/users/philix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-23T03:44:56Z","updated_at":"2015-04-23T09:44:21Z","closed_at":null,"body":"I attached LLDB to a running nvim instance and tried to autocomplete `!./li`. This was enough to freeze the editor.\r\n\r\n```c\r\n$ lldb\r\n(lldb) process attach --pid 38813\r\nProcess 38813 stopped\r\n* thread #1: tid = 0x5feae6, 0x00007fff97d0821a libsystem_kernel.dylib`kevent + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP\r\n    frame #0: 0x00007fff97d0821a libsystem_kernel.dylib`kevent + 10\r\nlibsystem_kernel.dylib`kevent:\r\n->  0x7fff97d0821a <+10>: jae    0x7fff97d08224            ; <+20>\r\n    0x7fff97d0821c <+12>: movq   %rax, %rdi\r\n    0x7fff97d0821f <+15>: jmp    0x7fff97d02c53            ; cerror_nocancel\r\n    0x7fff97d08224 <+20>: retq\r\n\r\nExecutable module set to \"/Users/felipe/src/neovim/./build/bin/nvim\".\r\nArchitecture set to: x86_64h-apple-macosx.\r\n(lldb) continue\r\nProcess 38813 resuming\r\nProcess 38813 stopped\r\n* thread #1: tid = 0x5feae6, 0x00007fff948c7fcf libsystem_platform.dylib`OSSpinLockLock + 7, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n    frame #0: 0x00007fff948c7fcf libsystem_platform.dylib`OSSpinLockLock + 7\r\nlibsystem_platform.dylib`OSSpinLockLock:\r\n->  0x7fff948c7fcf <+7>:  lock\r\n    0x7fff948c7fd0 <+8>:  cmpxchgl %ecx, (%rdi)\r\n    0x7fff948c7fd3 <+11>: testl  %eax, %eax\r\n    0x7fff948c7fd5 <+13>: je     0x7fff948c7fdc            ; <+20>\r\n(lldb) thread backtrace\r\n* thread #1: tid = 0x5feae6, 0x00007fff948c7fcf libsystem_platform.dylib`OSSpinLockLock + 7, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n  * frame #0: 0x00007fff948c7fcf libsystem_platform.dylib`OSSpinLockLock + 7\r\n    frame #1: 0x000000010a5ab994 nvim`je_arena_dalloc_large [inlined] je_malloc_mutex_lock + 36 at mutex.h:75\r\n    frame #2: 0x000000010a5ab987 nvim`je_arena_dalloc_large(arena=0x04b881f8458b48ff, chunk=0x000000010a400000, ptr=0x000000010a5d3654) + 23 at arena.c:1978\r\n    frame #3: 0x000000010a59c0c2 nvim`ifree + 1298 at arena.h:1056\r\n    frame #4: 0x000000010a59be70 nvim`ifree + 423 at jemalloc_internal.h:898\r\n    frame #5: 0x000000010a59bcc9 nvim`ifree + 23 at jemalloc_internal.h:917\r\n    frame #6: 0x000000010a59bcb2 nvim`ifree [inlined] je_iqalloc at jemalloc_internal.h:924\r\n    frame #7: 0x000000010a59bcb2 nvim`ifree(ptr=<unavailable>) + 258 at jemalloc.c:1233\r\n    frame #8: 0x000000010a420515 nvim`xfree(ptr=0x000000010a5d3654) + 21 at memory.c:106\r\n    frame #9: 0x000000010a3b7f6f nvim`expand_shellcmd(filepat=0x000000000ad68278, num_file=0x00007fff558fefa4, file=0x00007fff558fefa8, flagsarg=41) + 1167 at ex_getln.c:3902\r\n    frame #10: 0x000000010a3b3ebe nvim`ExpandFromContext(xp=0x00007fff558fef78, pat=0x000000000ad68278, num_file=0x00007fff558fefa4, file=0x00007fff558fefa8, options=218) + 1294 at ex_getln.c:3632\r\n    frame #11: 0x000000010a3af9a8 nvim`ExpandOne(xp=0x00007fff558fef78, str=0x000000000ad68278, orig=0x000000000ab8da60, options=218, mode=3) + 664 at ex_getln.c:2774\r\n    frame #12: 0x000000010a3b1a4b nvim`nextwild(xp=0x00007fff558fef78, type=3, options=8, escape=1) + 443 at ex_getln.c:2616\r\n    frame #13: 0x000000010a3ac17e nvim`getcmdline(firstc=58, count=1, indent=0) + 6190 at ex_getln.c:695\r\n    frame #14: 0x000000010a3b2cef nvim`getexline(c=58, cookie=0x0000000000000000, indent=0) + 79 at ex_getln.c:1679\r\n    frame #15: 0x000000010a38e497 nvim`do_cmdline(cmdline=0x0000000000000000, fgetline=0x000000010a3b2ca0, cookie=0x0000000000000000, flags=0) + 2135 at ex_docmd.c:539\r\n    frame #16: 0x000000010a44b2db nvim`nv_colon(cap=0x00007fff558ff898) + 267 at normal.c:4049\r\n    frame #17: 0x000000010a4414c0 nvim`normal_cmd(oap=0x00007fff558ff958, toplevel=true) + 6512 at normal.c:907\r\n    frame #18: 0x000000010a400ea1 nvim`main_loop(cmdwin=0, noexmode=0) + 2001 at main.c:708\r\n    frame #19: 0x000000010a3fdcd6 nvim`main(argc=1, argv=0x00007fff558ffb70) + 2614 at main.c:495\r\n    frame #20: 0x00007fff8fb2a5c9 libdyld.dylib`start + 1\r\n```"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/95514051","html_url":"https://github.com/neovim/neovim/issues/2487#issuecomment-95514051","issue_url":"https://api.github.com/repos/neovim/neovim/issues/2487","id":95514051,"user":{"login":"oni-link","id":2077655,"avatar_url":"https://avatars.githubusercontent.com/u/2077655?v=3","gravatar_id":"","url":"https://api.github.com/users/oni-link","html_url":"https://github.com/oni-link","followers_url":"https://api.github.com/users/oni-link/followers","following_url":"https://api.github.com/users/oni-link/following{/other_user}","gists_url":"https://api.github.com/users/oni-link/gists{/gist_id}","starred_url":"https://api.github.com/users/oni-link/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oni-link/subscriptions","organizations_url":"https://api.github.com/users/oni-link/orgs","repos_url":"https://api.github.com/users/oni-link/repos","events_url":"https://api.github.com/users/oni-link/events{/privacy}","received_events_url":"https://api.github.com/users/oni-link/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T09:44:21Z","updated_at":"2015-04-23T09:44:21Z","body":"A static allocated string is freed. This was introduced [here](https://github.com/mbainter/neovim/commit/a7e17de048b0791329cf1ad4d4c291290a99040a#diff-c0e00d2bd89b0443251856334519654cR3851) when refactoring `vim_getenv()` and removing a `bool` flag that prevented this."}}