Dominique Pelle wrote:
> On Fri, Aug 22, 2008 at 3:32 AM, Matt Wozniski wrote:
>
> > Not sure what's going on here, but I've found a crash that's easy to
> > reproduce. First, open two X11 enabled vim (not gvim) processes. In
> > the first, do:
> > :let @+ = repeat('a', 1024*1024)
> > in order to store 1MB of data to the clipboard. The exact amount is
> > irrelevant, but the larger the size, the more often it will lead to a
> > segfault.
> >
> > Then, in the second vim instance, repeatedly do ":reg +" and see what
> > gets displayed. Depending upon the amount of data that you put on the
> > clipboard, as well as upon some other factor I'm not seeing, this will
> > either a) show a bunch of a's in register +, b) not show any
> > registers, as though register + didn't exist, or c) cause the vim in
> > which you copied to segfault, and the vim in which you're trying to
> > display the register to enter a tight loop wasting a lot of CPU and
> > only dying for kill -9. Just try the command 5 or so times and you
> > should see a segfault - as well as the missing-register behavior. If
> > you don't get the segfault at all, try upping the amount of data
> > stored to the clipboard. If you get the segfault, but not the
> > missing-register behavior, try lowering the amount of data stored to
> > the clipboard. And if you can't reproduce either, that might help to
> > pin down what exactly causes this.
> >
> > I can reproduce this on both a vim linked with the GTK2-Gnome gui, and
> > one linked with the X11-Motif gui, so it doesn't seem to be something
> > gnome-specific, either. This is vim 7.2.
> >
> > Let me know if we need more details.
> >
> > ~Matt
>
>
> I tried it with Vim-7.2.2 (GTK2-GNOME) on Linux x86 and ":reg +" did
> not show anything for me, no crash observed. But I expected to see
> "aaa...." when doing ":reg +". Running both instances of Vim with
> Valgrind memory checker finds problems in both instances of Vim:
[...]
> Doing the same with a smaller value such as ":let @+ = repeat('a', 10*10"
> gives no error with Valgrind, and the second instance of Vim shows a bunch
> of "aaa..." when doing ":reg +" as expected. I did not have the time to look
> further yet.
It's not clear if this is a problem in Vim or in the X libraries.
Might be a bit difficult to figure out.
Perhaps Vim should limit the size of the text it puts in the clipboard.
However, it's difficult to decide what is a reasonable limit.
--
Bad fashion can discourage normal people from interacting with the engineer
and talking about the cute things their children do.
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---