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

segfault with nfa

Expand Messages
  • Urtica dioica
    When using the NFA engine, the following seems to cause a segfault: / ze* If you have set incsearch , you don t even need to press Enter. -- -- You received
    Message 1 of 9 , Aug 26, 2014
    • 0 Attachment
      When using the NFA engine, the following seems to cause a segfault:

      /\ze*

      If you have "set incsearch", you don't even need to press Enter.

      --
      --
      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/d/optout.
    • Christian J. Robinson
      ... I can confirm that this crashes Vim under Windows, so this isn t OS-specific. - Christian -- Hearts will never be practical til they re unbreakable.
      Message 2 of 9 , Aug 26, 2014
      • 0 Attachment
        On Tue, 26 Aug 2014, Urtica dioica wrote:

        > When using the NFA engine, the following seems to cause a segfault:
        >
        > /\ze*
        >
        > If you have "set incsearch", you don't even need to press Enter.

        I can confirm that this crashes Vim under Windows, so this isn't
        OS-specific.

        - Christian

        --
        Hearts will never be practical 'til they're unbreakable.
        Christian J. Robinson <heptite@...> http://christianrobinson.name/

        --
        --
        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/d/optout.
      • mattn
        I can t reproduce it. What version of vim do you use? Any options related for this behavior? -- -- You received this message from the vim_dev maillist. Do
        Message 3 of 9 , Aug 26, 2014
        • 0 Attachment
          I can't reproduce it. What version of vim do you use? Any options related for this behavior?

          --
          --
          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/d/optout.
        • Christian J. Robinson
          ... For me any of the 7.4 versions I have installed crash. I m up-to-date with patchlevel 417 on the version I mostly use. It crashes even with -u NONE (i.e.
          Message 4 of 9 , Aug 26, 2014
          • 0 Attachment
            On Tue, 26 Aug 2014, mattn wrote:

            > I can't reproduce it. What version of vim do you use? Any options related for this behavior?

            For me any of the 7.4 versions I have installed crash. I'm up-to-date
            with patchlevel 417 on the version I mostly use. It crashes even with
            -u NONE (i.e. default settings with no config).

            - Christian

            --
            Courage is resistance to fear, mastery of fear - not absence of fear.
            -- Mark Twain
            Christian J. Robinson <heptite@...> http://christianrobinson.name/

            --
            --
            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/d/optout.
          • John Little
            ... I see it, vim 7.4.408, Kubuntu 64 bit. I did a core dump and the backtrace shows vim calling addstate on lines 4411 and 4618 of regexp_nfa.c repeatedly
            Message 5 of 9 , Aug 26, 2014
            • 0 Attachment
              On Wednesday, August 27, 2014 12:21:01 PM UTC+12, Urtica dioica wrote:
              > When using the NFA engine, the following seems to cause a segfault:
              >
              > /\ze*

              I see it, vim 7.4.408, Kubuntu 64 bit. I did a core dump and the backtrace shows vim calling addstate on lines 4411 and 4618 of regexp_nfa.c repeatedly until it presumably blows stack space, 65,419 levels deep.

              Regards, John Little

              --
              --
              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/d/optout.
            • mattn
              I reproduced it. -- -- 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
              Message 6 of 9 , Aug 26, 2014
              • 0 Attachment
                I reproduced it.

                --
                --
                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/d/optout.
              • mattn
                Seems need to avoid following by zero-width. diff -r aeafe78fc869 src/regexp_nfa.c ... +++ b/src/regexp_nfa.c Wed Aug 27 15:35:21 2014 +0900 @@ -4408,8
                Message 7 of 9 , Aug 26, 2014
                • 0 Attachment
                  Seems need to avoid following by zero-width.

                  diff -r aeafe78fc869 src/regexp_nfa.c
                  --- a/src/regexp_nfa.c Fri Aug 22 13:13:28 2014 +0200
                  +++ b/src/regexp_nfa.c Wed Aug 27 15:35:21 2014 +0900
                  @@ -4408,8 +4408,10 @@

                  case NFA_SPLIT:
                  /* order matters here */
                  - subs = addstate(l, state->out, subs, pim, off);
                  - subs = addstate(l, state->out1, subs, pim, off);
                  + if (state->out->c != NFA_ZSTART && state->out->c != NFA_ZEND) {
                  + subs = addstate(l, state->out, subs, pim, off);
                  + subs = addstate(l, state->out1, subs, pim, off);
                  + }
                  break;

                  case NFA_EMPTY:

                  --
                  --
                  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/d/optout.
                • Bram Moolenaar
                  ... Thanks! I ll check it out. -- hundred-and-one symptoms of being an internet addict: 79. All of your most erotic dreams have a scrollbar at the right side.
                  Message 8 of 9 , Aug 27, 2014
                  • 0 Attachment
                    Yasuhiro Matsumoto wrote:

                    > Seems need to avoid following by zero-width.
                    >
                    > diff -r aeafe78fc869 src/regexp_nfa.c
                    > --- a/src/regexp_nfa.c Fri Aug 22 13:13:28 2014 +0200
                    > +++ b/src/regexp_nfa.c Wed Aug 27 15:35:21 2014 +0900
                    > @@ -4408,8 +4408,10 @@
                    >
                    > case NFA_SPLIT:
                    > /* order matters here */
                    > - subs = addstate(l, state->out, subs, pim, off);
                    > - subs = addstate(l, state->out1, subs, pim, off);
                    > + if (state->out->c != NFA_ZSTART && state->out->c != NFA_ZEND) {
                    > + subs = addstate(l, state->out, subs, pim, off);
                    > + subs = addstate(l, state->out1, subs, pim, off);
                    > + }
                    > break;
                    >
                    > case NFA_EMPTY:

                    Thanks! I'll check it out.

                    --
                    hundred-and-one symptoms of being an internet addict:
                    79. All of your most erotic dreams have a scrollbar at the right side.

                    /// 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/d/optout.
                  • mattn
                    My workaround patch doesn t work zs correctly with following. ( zsfoo | zsbar ) -- -- You received this message from the vim_dev maillist. Do not top-post!
                    Message 9 of 9 , Aug 28, 2014
                    • 0 Attachment
                      My workaround patch doesn't work \zs correctly with following.

                      \(\zsfoo\|\zsbar\)

                      --
                      --
                      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/d/optout.
                    Your message has been successfully submitted and would be delivered to recipients shortly.