Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-860

cbc-connstr segfaults on trying to access Connspec fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.2
    • Component/s: None
    • Labels:
      None

      Description

      (gdb) run connstr couchbase://localhost:9000
      Starting program: /usr/bin/cbc connstr couchbase://localhost:9000
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib64/libthread_db.so.1".
       
      Program received signal SIGSEGV, Segmentation fault.
      std::string::assign (this=0x7fffffffcd28, __s=0x67d2a8 "couchbase://localhost:9000", __n=0x1a) at /usr/src/debug/gcc-7.2.1-20170915/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.tcc:712
      712	      _M_check_length(this->size(), __n, "basic_string::assign");
      (gdb) bt
      #0  std::string::assign (this=0x7fffffffcd28, __s=0x67d2a8 "couchbase://localhost:9000", __n=0x1a) at /usr/src/debug/gcc-7.2.1-20170915/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.tcc:712
      #1  0x00007ffff7b4af63 in std::string::assign (__s=0x67d2a8 "couchbase://localhost:9000", this=0x7fffffffcd28) at /usr/include/c++/4.8.2/bits/basic_string.h:1131
      #2  std::string::operator= (__s=0x67d2a8 "couchbase://localhost:9000", this=0x7fffffffcd28) at /usr/include/c++/4.8.2/bits/basic_string.h:555
      #3  lcb::Connspec::parse (this=this@entry=0x7fffffffccf0, connstr_=0x67d2a8 "couchbase://localhost:9000", errmsg=errmsg@entry=0x7fffffffcc48) at /usr/src/debug/libcouchbase-2.8.1/src/connspec.cc:292
      #4  0x0000000000410574 in cbc::ConnstrHandler::run (this=<optimized out>) at /usr/src/debug/libcouchbase-2.8.1/tools/cbc.cc:1455
      #5  0x000000000040ac10 in cbc::Handler::execute (this=0x677ca0, argc=argc@entry=0x2, argv=argv@entry=0x7fffffffdb20) at /usr/src/debug/libcouchbase-2.8.1/tools/cbc.cc:353
      #6  0x0000000000407e63 in main (argc=0x2, argv=0x7fffffffdb20) at /usr/src/debug/libcouchbase-2.8.1/tools/cbc.cc:1790
      

      The library should never memset C++ class instance.

        Attachments

        For Gerrit Dashboard: CCBC-860
        # Subject Branch Project Status CR V

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              avsej Sergey Avseyev
              Reporter:
              avsej Sergey Avseyev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.