Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2536

new TSocket, uninitialised value reported by valgrind

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • None
    • 0.10.0
    • C++ - Library
    • None
    • BSD, Valgrind

    Description

      ========================================================================================
      src:
      https://apache.googlesource.com/thrift/+/master/lib/cpp/src/thrift/transport/TSocket.cpp

      ========================================================================================
      code:

      boost::shared_ptr<TSocket> socket(new TSocket("192.168.0.1", 9090));
      boost::shared_ptr<TTransport> transport(new TBufferedTransport(socket));
      boost::shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
      LancomLocationBasedServices::LbsControlClient client(protocol);
      transport->open();

      ========================================================================================
      valgrind --leak-check=yes --track-origins=yes binary

      =>

      ==49066== Conditional jump or move depends on uninitialised value(s)
      ==49066== at 0x136A443: apache::thrift::transport::TSocket::openConnection(addrinfo*) (TSocket.cpp:309)
      ==49066== by 0x136B3F8: apache::thrift::transport::TSocket::local_open() (TSocket.cpp:392)
      by *********: transport->open()

      ==49066== Uninitialised value was created by a stack allocation
      ==49066== at 0x136A14D: apache::thrift::transport::TSocket::openConnection(addrinfo*) (TSocket.cpp:180)

      Attachments

        Activity

          People

            jking3 James E. King III
            Christoph Wollgarten Christoph Wollgarten
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: