Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-505

Future-proof handling of tag strings

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4.1
    • None
    • None
    • 1

    Attachments

      Issue Links

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          The library should not assume anything about memory returned by the library. The library gives to wrapper pointer and size of allocated memory, and do not expect that wrapper will call to realloc or free. This is implementation details and can be changed in any time.

           

          I don't agree that to fix it you have to bring more assumptions about how we keep tags in libcouchbase. This will only complicate things. I see that you use version detection macro in your patch, but this will not work. As the way how we allocate and manage memory in libcouchbase is not part of the public API and can be changed without version bump, and what you would do if the user, who've been using old version will just update libcouchbase shared object?

          avsej Sergey Avseyev added a comment - The library should not assume anything about memory returned by the library. The library gives to wrapper pointer and size of allocated memory, and do not expect that wrapper will call to realloc or free. This is implementation details and can be changed in any time.   I don't agree that to fix it you have to bring more assumptions about how we keep tags in libcouchbase. This will only complicate things. I see that you use version detection macro in your patch, but this will not work. As the way how we allocate and manage memory in libcouchbase is not part of the public API and can be changed without version bump, and what you would do if the user, who've been using old version will just update libcouchbase shared object?
          Ellis.Breen Ellis Breen added a comment - - edited

          My apologies, it is a premature optimisation that introduces assumptions about ownership. I had inferred that that was part of the significance of nbuf being zero, and the fact that memory is allocated by the code in libcouchbase when nbuf is zero and never freed, but this was never explicitly guaranteed.

          Will make this change non-version sensitive. Thanks.

          Ellis.Breen Ellis Breen added a comment - - edited My apologies, it is a premature optimisation that introduces assumptions about ownership. I had inferred that that was part of the significance of nbuf being zero, and the fact that memory is allocated by the code in libcouchbase when nbuf is zero and never freed, but this was never explicitly guaranteed. Will make this change non-version sensitive. Thanks.

          People

            Ellis.Breen Ellis Breen
            Ellis.Breen Ellis Breen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty