Loading ...
Sorry, an error occurred while loading the content.

Crash with spell suggestions, 7.4a.24

Expand Messages
  • Mike Williams
    Hi, Been playing with reduced maxmem and found I can crash VIM when getting spelling suggestions. The following will reproduce the crash under Windows (line
    Message 1 of 3 , Jul 15, 2013
    • 0 Attachment
      Hi,

      Been playing with reduced maxmem and found I can crash VIM when getting
      spelling suggestions. The following will reproduce the crash under
      Windows (line wrapped, and lots of fun getting the double quotes right):

      gvim -u NONE -U NONE -c "call feedkeys("":set" "maxmem=512"
      "spell\<CR>iasd\<ESC>z=""")"

      The crash is in mf_write_block() checking the encrypt key
      *mfp->mf_buffer->b_p_key when the pointer is NULL. Since the pointer is
      expected to be valid then there is a path through the spell code that is
      not setting up the buffer parameters right. Sorry no time at the moment
      to dive any deeper.

      My Vim is built with (ie features is big):

      nmake -f make_mvc.mak GUI=yes WINVER=0x0501 CPUNR=pentium4
      POSTSCRIPT=yes PYTHON=h:\python27 PYTHON_VER=27 DYNAMIC_PYTHON=yes

      Reproducible under unix as well.

      Mike
      --
      I have read and understood the above. X________________

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Mike Williams
      ... Scratched the itch - attached is patch to fix the crash. There may be other lurking gotchas with the minimal buffer initialisation created by the spell
      Message 2 of 3 , Jul 15, 2013
      • 0 Attachment
        On 15/07/2013 09:40, Mike Williams wrote:
        > Hi,
        >
        > Been playing with reduced maxmem and found I can crash VIM when getting
        > spelling suggestions. The following will reproduce the crash under
        > Windows (line wrapped, and lots of fun getting the double quotes right):
        >
        > gvim -u NONE -U NONE -c "call feedkeys("":set" "maxmem=512"
        > "spell\<CR>iasd\<ESC>z=""")"
        >
        > The crash is in mf_write_block() checking the encrypt key
        > *mfp->mf_buffer->b_p_key when the pointer is NULL. Since the pointer is
        > expected to be valid then there is a path through the spell code that is
        > not setting up the buffer parameters right. Sorry no time at the moment
        > to dive any deeper.
        >
        > My Vim is built with (ie features is big):
        >
        > nmake -f make_mvc.mak GUI=yes WINVER=0x0501 CPUNR=pentium4
        > POSTSCRIPT=yes PYTHON=h:\python27 PYTHON_VER=27 DYNAMIC_PYTHON=yes
        >
        > Reproducible under unix as well.

        Scratched the itch - attached is patch to fix the crash. There may be
        other lurking gotchas with the minimal buffer initialisation created by
        the spell code.

        Mike
        --
        I wish I were what I was when I wished I were what I am now.

        --
        --
        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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Bram Moolenaar
        ... Thanks. I can reproduce the crash. I ll check out your fix and see if there are similar problems. -- BEDEVERE: Why do you think she is a witch?
        Message 3 of 3 , Jul 15, 2013
        • 0 Attachment
          Mike Williams wrote:

          > On 15/07/2013 09:40, Mike Williams wrote:
          > > Hi,
          > >
          > > Been playing with reduced maxmem and found I can crash VIM when getting
          > > spelling suggestions. The following will reproduce the crash under
          > > Windows (line wrapped, and lots of fun getting the double quotes right):
          > >
          > > gvim -u NONE -U NONE -c "call feedkeys("":set" "maxmem=512"
          > > "spell\<CR>iasd\<ESC>z=""")"
          > >
          > > The crash is in mf_write_block() checking the encrypt key
          > > *mfp->mf_buffer->b_p_key when the pointer is NULL. Since the pointer is
          > > expected to be valid then there is a path through the spell code that is
          > > not setting up the buffer parameters right. Sorry no time at the moment
          > > to dive any deeper.
          > >
          > > My Vim is built with (ie features is big):
          > >
          > > nmake -f make_mvc.mak GUI=yes WINVER=0x0501 CPUNR=pentium4
          > > POSTSCRIPT=yes PYTHON=h:\python27 PYTHON_VER=27 DYNAMIC_PYTHON=yes
          > >
          > > Reproducible under unix as well.
          >
          > Scratched the itch - attached is patch to fix the crash. There may be
          > other lurking gotchas with the minimal buffer initialisation created by
          > the spell code.

          Thanks. I can reproduce the crash. I'll check out your fix and see if
          there are similar problems.

          --
          BEDEVERE: Why do you think she is a witch?
          SECOND VILLAGER: She turned me into a newt.
          BEDEVERE: A newt?
          SECOND VILLAGER: (After looking at himself for some time) I got better.
          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

          /// Bram Moolenaar -- Bram@... -- 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 vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.