On Sun, Jul 9, 2017 at 3:06 PM, Aron Griffis <agrif...@gmail.com> wrote:

>
>
> On Sun, Jul 9, 2017 at 1:19 PM, Bram Moolenaar <b...@moolenaar.net> wrote:
>
>>
>> Aron Griffis wrote:
>>
>> > On Saturday, July 8, 2017 at 4:38:36 PM UTC-4, Bram Moolenaar wrote:
>> > > Patch 8.0.0702
>> > > Problem:    An error in a timer can make Vim unusable.
>> > > Solution:   Don't set the error flag or exception from a timer.  Stop
>> a timer
>> > >             if it causes an error 3 out of 3 times.  Discard an
>> exception
>> > >             caused inside a timer.
>> > > Files:      src/ex_cmds2.c, src/structs.h,
>> src/testdir/test_timers.vim,
>> > >             runtime/doc/eval.txt
>> >
>> > This patch is causing segfaults for me. I've built with and without it
>> to verify.
>> >
>> > I have a timer to check a couple files and update my color scheme when
>> they change. I haven't tried to narrow down any specific lines yet, but
>> when TryTheme actually triggers then vim segfaults immediately. Maybe
>> because of the try/catch?
>> >
>> > Here's the code from my vimrc:
>>
>> [..]
>>
>> I haven't managed to reproduce it.  Can you run Vim in a debugger and
>> see the call stack?
>>
>>
> [..]
>
> Full disclosure: My build includes a few extra patches from the Fedora
> RPM, but since Christian got a similar backtrace, I don't think those
> patches are related.
>

In fact, I just rebuilt from pristine 702 source to make sure:

$ CFLAGS=-ggdb ./configure --enable-gui=no --without-x
$ make
$ cd src
$ gdb ./vim
(gdb) run

(change the content of .vim/background and .vim/scheme, cause segfault)

(gdb) bt
#0  0x00007ffff6d0c8f3 in malloc_consolidate.part () from /lib64/libc.so.6
#1  0x00007ffff6d108a6 in _int_malloc () from /lib64/libc.so.6
#2  0x00007ffff6d13a08 in malloc () from /lib64/libc.so.6
#3  0x00000000004dac95 in lalloc (size=2120, message=1) at misc2.c:942
#4  0x00000000004dab62 in alloc (size=2120) at misc2.c:840
#5  0x00000000005b9c1a in call_user_func (fp=0x96db40, argcount=1,
argvars=0x7fffffffaa60, rettv=0x7fffffffb180, firstline=1, lastline=1,
selfdict=0x0) at userfunc.c:723
#6  0x00000000005bb2ec in call_func (funcname=0x9f9cb0
"airline#statusline(1)", len=18, rettv=0x7fffffffb180, argcount_in=1,
argvars_in=0x7fffffffaa60, argv_func=0x0, firstline=1, lastline=1,
    doesrange=0x7fffffffac44, evaluate=1, partial=0x0, selfdict_in=0x0) at
userfunc.c:1427
#7  0x00000000005b9560 in get_func_tv (name=0x9f9cb0
"airline#statusline(1)", len=18, rettv=0x7fffffffb180, arg=0x7fffffffb0d0,
firstline=1, lastline=1, doesrange=0x7fffffffac44, evaluate=1, partial=0x0,
    selfdict=0x0) at userfunc.c:455
#8  0x0000000000430db4 in eval7 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1, want_string=0) at eval.c:4332
#9  0x000000000043059c in eval6 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1, want_string=0) at eval.c:3969
#10 0x0000000000430153 in eval5 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1) at eval.c:3785
#11 0x000000000042f6b1 in eval4 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1) at eval.c:3484
#12 0x000000000042f507 in eval3 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1) at eval.c:3401
#13 0x000000000042f380 in eval2 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1) at eval.c:3333
#14 0x000000000042f1b7 in eval1 (arg=0x7fffffffb0d0, rettv=0x7fffffffb180,
evaluate=1) at eval.c:3261
#15 0x000000000042f110 in eval0 (arg=0x9f2302 "airline#statusline(1)",
rettv=0x7fffffffb180, nextcmd=0x0, evaluate=1) at eval.c:3221
#16 0x000000000042a5d6 in eval_to_string (arg=0x9f2302
"airline#statusline(1)", nextcmd=0x0, convert=0) at eval.c:757
#17 0x000000000042a751 in eval_to_string_safe (arg=0x9f2302
"airline#statusline(1)", nextcmd=0x0, use_sandbox=0) at eval.c:805
#18 0x000000000040af55 in build_stl_str_hl (wp=0x87b9d0, out=0x7fffffffc650
"@\336\377\377\377\177", outlen=4096, fmt=0x9f2300
"%!airline#statusline(1)", use_sandbox=0, fillchar=32, maxwidth=213,
    hltab=0x7fffffffc150, tabtab=0x7fffffffbc50) at buffer.c:3893
#19 0x000000000055dc31 in win_redr_custom (wp=0x87b9d0, draw_ruler=0) at
screen.c:7161
#20 0x000000000055d6db in redraw_custom_statusline (wp=0x87b9d0) at
screen.c:6944
#21 0x000000000055d1b6 in win_redr_status (wp=0x87b9d0) at screen.c:6815
#22 0x000000000055164a in update_screen (type_arg=5) at screen.c:773
#23 0x0000000000550f99 in redraw_after_callback () at screen.c:468
#24 0x000000000045f7b2 in check_due_timer () at ex_cmds2.c:1268
#25 0x000000000051c86e in WaitForChar (msec=-1, interrupted=0x7fffffffd880)
at os_unix.c:5500
#26 0x0000000000518718 in mch_inchar (buf=0x86d3fa <typebuf_init+58> "",
maxlen=68, wtime=-1, tb_change_cnt=5) at os_unix.c:481
#27 0x00000000005b0d6f in ui_inchar (buf=0x86d3fa <typebuf_init+58> "",
maxlen=68, wtime=-1, tb_change_cnt=5) at ui.c:195
#28 0x00000000004a6305 in inchar (buf=0x86d3fa <typebuf_init+58> "",
maxlen=206, wait_time=-1, tb_change_cnt=5) at getchar.c:3065
#29 0x00000000004a5fa2 in vgetorpeek (advance=1) at getchar.c:2841
#30 0x00000000004a437c in vgetc () at getchar.c:1608
#31 0x00000000004a4810 in safe_vgetc () at getchar.c:1804
#32 0x00000000004eac40 in normal_cmd (oap=0x7fffffffdc50, toplevel=1) at
normal.c:628
#33 0x00000000005e2391 in main_loop (cmdwin=0, noexmode=0) at main.c:1355
#34 0x00000000005e1c48 in vim_main2 () at main.c:908
#35 0x00000000005e143f in main (argc=1, argv=0x7fffffffde48) at main.c:419

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui