Kent Sibilev wrote:

> On Thursday, June 25, 2015 at 12:20:57 PM UTC-4, Kent Sibilev wrote:
> > This patch crashes vim for me when I'm starting it from tmux:
> > 
> > $ lldb vim
> > (lldb) target create "vim"
> > Current executable set to 'vim' (x86_64).
> > (lldb) run
> > Process 16364 launched: '/usr/local/bin/vim' (x86_64)
> > Process 16364 stopped
> > * thread #1: tid = 0x4f71ea, 0x0000000100193d13 vim`may_req_bg_color + 99 
> > at term.c:3429, queue = 'com.apple.main-thread', stop reason = 
> > EXC_BAD_ACCESS (code=1, address=0x0)
> >     frame #0: 0x0000000100193d13 vim`may_req_bg_color + 99 at term.c:3429
> >    3426             && p_ek
> >    3427 #  ifdef UNIX
> >    3428             && isatty(1)
> > -> 3429             && isatty(read_cmd_fd)
> >    3430 #  endif
> >    3431             && *T_RBG != NUL
> >    3432             && !option_was_set((char_u *)"bg"))
> > (lldb)
> > 
> > 
> > Kent.
> 
> This diff fixes the crash, but i'm not sure it is correct way to fix the 
> problem:
> 
> diff --git a/src/term.c b/src/term.c
> index 0d684e0..9dace0b 100644
> --- a/src/term.c
> +++ b/src/term.c
> @@ -3428,7 +3428,7 @@ may_req_bg_color()
>             && isatty(1)
>             && isatty(read_cmd_fd)
>  #  endif
> -           && *T_RBG != NUL
> +           && T_RBG != NUL && *T_RBG != NUL
>             && !option_was_set((char_u *)"bg"))
>      {
>         LOG_TR("Sending BG request");

Thanks for reporting this.  No, this is not the right solution.
An entry for T_RBG is missing in options.c.  I'll make a patch.

-- 
hundred-and-one symptoms of being an internet addict:
152. You find yourself falling for someone you've never seen or hardly
     know, but, boy can he/she TYPE!!!!!!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui