Hi,

On Fri, Apr 12, 2013 at 1:20 PM, Christian Brabandt <[email protected]> wrote:
> Hi Yegappan!
>
> On Do, 11 Apr 2013, Yegappan Lakshmanan wrote:
>
>> Hi all,
>>
>> I am running Vim 7.3.831 on a Linux system built with GTK 2.0.
>> When I execute the following steps, Vim crashes:
>>
>> 1. Open an empty buffer
>> 2. Enter insert mode using 'i'
>> 3. Insert 262040 characters using <CTRL-R>=repeat('a', 262040)
>> 4. Press <Esc>
>> 5. Select and yank all the characters using 'V' and 'y'
>> 6. Wait for a few seconds and move the cursor
>>
>> The crash traceback is below:
>>
>> #0  0x0048dfb9 in free () from /lib/tls/libc.so.6
>> #1  0x0088c3a3 in XtFree () from /usr/X11R6/lib/libXt.so.6
>> #2  0x008ad502 in XtAppGetSelectionTimeout () from /usr/X11R6/lib/libXt.so.6
>> #3  0x008a7144 in _XtRemoveAllInputs () from /usr/X11R6/lib/libXt.so.6
>> #4  0x008a74b2 in XtAppNextEvent () from /usr/X11R6/lib/libXt.so.6
>> #5  0x08139ae4 in xterm_update () at os_unix.c:6824
>> #6  0x08138089 in RealWaitForChar (fd=0, msec=0, check_for_gpm=0x0) at
>> os_unix.c:5200            U __be_errno_kernel_to_ios
>> #7  0x08137e74 in mch_breakcheck () at os_unix.c:4847
>> #8  0x080dcc85 in vgetorpeek (advance=1) at getchar.c:2014
>> #9  0x080db494 in vgetc () at getchar.c:1582
>> #10 0x080db90f in safe_vgetc () at getchar.c:1787
>> #11 0x0811437c in normal_cmd (oap=0xbfff85d0, toplevel=1) at normal.c:665
>> #12 0x081b649e in main_loop (cmdwin=0, noexmode=0) at main.c:1306
>> #13 0x081b5c70 in main (argc=0, argv=0x0) at main.c:1010
>>
>> I can consistently reproduce this crash. I couldn't reproduce this crash
>> with
>> the earlier Vim 7.2 release.
>>
>> Anyone else able to reproduce this crash?
>
> I was able to reproduce the crash just once and then I couldn't
> reproduce it anymore. It seems that something in the X-libraries
> (starting with XtAppnextEvent()) is going wrong. (I got a double free()
> error in free())
>

I spent some time trying to narrow down the patch that introduced
this problem. I am not able to reproduce the crash with the
7.2.446 release. But I am able to reproduce the crash with Vim 7.3
version.

I found that the following change to os_unix.c fixes the crash:

*** os_unix.c.orig      2013-04-15 21:05:25.000000000 -0700
--- os_unix.c   2013-04-15 21:12:38.000000000 -0700
*************** setup_term_clip()
*** 6465,6471 ****
            return;

        x11_setup_atoms(xterm_dpy);
-       x11_setup_selection(xterm_Shell);
        if (x11_display == NULL)
            x11_display = xterm_dpy;

--- 6465,6470 ----

This line was introduced in the 7.3 Vim release.

- Yegappan

-- 
-- 
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/groups/opt_out.


Raspunde prin e-mail lui