Ticket #10924: mythlogserver-segv.patch

File mythlogserver-segv.patch, 1.2 KB (added by faginbagin <mythtv@…>, 8 years ago)
  • mythtv/libs/libmythbase/logging.cpp

    diff --git a/mythtv/libs/libmythbase/logging.cpp b/mythtv/libs/libmythbase/logging.cpp
    index d48a3a2..2407e45 100644
    a b void LoggerThread::run(void) 
    328328        {
    329329            qRegisterMetaType<QList<QByteArray> >("QList<QByteArray>");
    330330
     331            // Let m_zmqContext own the socket to prevent core dump in mythlogserver
     332            // If this object takes ownership by calling:
     333            // m_zmqSocket =
     334            //     m_zmqContext->createSocket(nzmqt::ZMQSocket::TYP_DEALER, this);
     335            // Qt will delete the socket when our destructor is called.
     336            // Later, Qt's event loop will post a destroyed event to m_zmqContext
     337            // which will call m_zmqSocket->disconnect() causing a core dump.
    331338            m_zmqSocket =
    332                 m_zmqContext->createSocket(nzmqt::ZMQSocket::TYP_DEALER, this);
     339                m_zmqContext->createSocket(nzmqt::ZMQSocket::TYP_DEALER);
    333340            connect(m_zmqSocket,
    334341                    SIGNAL(messageReceived(const QList<QByteArray>&)),
    335342                    SLOT(messageReceived(const QList<QByteArray>&)),