Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-1477

If linked with boost_serialization, client application using c++ lib will crash on connecting to broker

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • M4
    • M4
    • C++ Client
    • None

    Description

      ==10300== Invalid read of size 4
      ==10300== at 0x4325A38: boost::spirit::impl::object_with_id<boost::spirit::impl::grammar_tag, unsigned>::~object_with_id() (object_with_id.ipp:122)
      ==10300== by 0x432215A: qpid::Url::parse(char const*) (grammar.hpp:50)
      ==10300== by 0x804984B: qpid::Url::Url(char const*) (Url.h:60)

      Valgrind shows problem to be an issue with the spirit based url parser.

      #include <qpid/Url.h>
      using namespace qpid;

      int main(int argc, char ** argv)
      {
      for (uint i = 0; i < 100; i++)

      { Url url(argc > 1 ? argv[1] : "amqp:tcp:127.0.0.1"); }

      return 0;
      }

      Compiling the above and linking with boost_serialization causes a crash. As known urls are passed to the client on opening a connection, this is causing crashes when c++ client apps are also linked against boost_serialization.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gsim Gordon Sim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: