Kana Natsuno wrote:
> On Mon, 12 Oct 2009 05:03:27 +0900, Bram Moolenaar <[email protected]> wrote:
>> Can you somehow simplify the way to reproduce this and send me the Vim
>> script for this?
> 
> Sorry, I tried to simplify before reporting but failed.  Because the
> problem I encountered seems to depend on the number/order of operations,
> and the problem doesn't occur even if I delete a key/value pair
> expression from dictionary literal which seems not to be related to
> executing scripts.
> 
> Anyway, I'll try to simplify again.

Perhaps your problem is ...

In eval.c, all "s:" dictionary is stored in one array (ga_scripts).
When new script file is sourced, the array is re-allocated for new "s:"
dictionary.  Then "s:" dictionary, previously assigned to other variable
(e.g. :let g:foo = s:), will become an invalid pointer.


Script to reproduce: (might not crash 100%)

   let script_vars = []
   for src in range(10)
     call writefile(['call add(script_vars, s:)'], src)
     source `=src`
     " allocate memory to ensure crash.
     call repeat(' ', 1000)
   endfor
   echo script_vars


-- 
Yukihiro Nakadaira - [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui