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

Re: Crash when extend(o, o)

Expand Messages
  • Bram Moolenaar
    ... Thanks for the fix! Can you also write a test for this? -- Snoring is prohibited unless all bedroom windows are closed and securely locked. [real standing
    Message 1 of 5 , May 2, 2012
      Yasohiro Matsumoto wrote:

      > When passing same Dictionary/List to expand(), it breaks reference counter.
      >
      > let o = {"a":{"b":"B"}}
      > call extend(o, o)
      > echo o.a.b <= crash
      >
      > https://gist.github.com/2578755
      >
      > Please check and include.

      Thanks for the fix! Can you also write a test for this?

      --
      Snoring is prohibited unless all bedroom windows are closed and securely
      locked.
      [real standing law in Massachusetts, United States of America]

      /// 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
    • h_east
      ... Hi Bram, Patch modified and test added. eval.c patch author is Thinca. test patch author is me. (I have got consent from Yasuhiro Matsumoto.) Please check.
      Message 2 of 5 , May 5, 2012
        2012/5/3 (Thu) 3:55:50 UTC+9 Bram Moolenaar:
        > Yasohiro Matsumoto wrote:
        >
        > > When passing same Dictionary/List to expand(), it breaks reference counter.
        > >
        > > let o = {"a":{"b":"B"}}
        > > call extend(o, o)
        > > echo o.a.b <= crash
        > >
        > > https://gist.github.com/2578755
        > >
        > > Please check and include.
        >
        > Thanks for the fix! Can you also write a test for this?

        Hi Bram,

        Patch modified and test added.
        eval.c patch author is Thinca.
        test patch author is me.
        (I have got consent from Yasuhiro Matsumoto.)

        Please check.

        Regards,
        --
        Hirohito Higashi

        --
        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
      • mattn
        Thanks Hirohito. Bram, this original patch is writen by thinca. And tests above is writen by Hirohito. ... -- You received this message from the vim_dev
        Message 3 of 5 , May 5, 2012
          Thanks Hirohito.

          Bram, this original patch is writen by thinca. And tests above is writen by Hirohito.

          On Saturday, May 5, 2012 11:59:03 PM UTC+9, h_east wrote:
          > 2012/5/3 (Thu) 3:55:50 UTC+9 Bram Moolenaar:
          > > Yasohiro Matsumoto wrote:
          > >
          > > > When passing same Dictionary/List to expand(), it breaks reference counter.
          > > >
          > > > let o = {"a":{"b":"B"}}
          > > > call extend(o, o)
          > > > echo o.a.b <= crash
          > > >
          > > > https://gist.github.com/2578755
          > > >
          > > > Please check and include.
          > >
          > > Thanks for the fix! Can you also write a test for this?
          >
          > Hi Bram,
          >
          > Patch modified and test added.
          > eval.c patch author is Thinca.
          > test patch author is me.
          > (I have got consent from Yasuhiro Matsumoto.)
          >
          > Please check.
          >
          > Regards,
          > --
          > Hirohito Higashi

          --
          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
        • Bram Moolenaar
          ... Thanks! I will look into it soon. -- Living on Earth includes an annual free trip around the Sun. /// Bram Moolenaar -- Bram@Moolenaar.net --
          Message 4 of 5 , May 6, 2012
            Hirohito Higashi wrote:

            > 2012/5/3 (Thu) 3:55:50 UTC+9 Bram Moolenaar:
            > > Yasohiro Matsumoto wrote:
            > >
            > > > When passing same Dictionary/List to expand(), it breaks reference counter.
            > > >
            > > > let o = {"a":{"b":"B"}}
            > > > call extend(o, o)
            > > > echo o.a.b <= crash
            > > >
            > > > https://gist.github.com/2578755
            > > >
            > > > Please check and include.
            > >
            > > Thanks for the fix! Can you also write a test for this?
            >
            > Hi Bram,
            >
            > Patch modified and test added.
            > eval.c patch author is Thinca.
            > test patch author is me.
            > (I have got consent from Yasuhiro Matsumoto.)

            Thanks! I will look into it soon.

            --
            Living on Earth includes an annual free trip around the Sun.

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