Неинициализированное значение было создано выделением кучи в libchilkat?

я бегу sudo valgrind —leak-check = full -v —track-originins = yes ./myprogram
Результат:

    ==31734== 1 errors in context 7 of 7:
==31734== Conditional jump or move depends on uninitialised value(s)
==31734==    at 0x61CCCC: TlsProtocol::sendRecord(unsigned char const*, unsigned int, int, int, int, TlsEndpoint&, unsigned int, SocketParams&, LogBase&) (in /home/me/src/myprogram)
==31734==    by 0x61D32E: TlsProtocol::sendHandshakeMessages(DataBuffer&, int, int, TlsEndpoint&, unsigned int, SocketParams&, LogBase&) (in /home/me/src/myprogram)
==31734==    by 0x620B1C: TlsProtocol::sendClientHello(TlsEndpoint&, unsigned int, SocketParams&, LogBase&) (in /home/me/src/myprogram)
==31734==    by 0x6265E7: TlsProtocol::clientHandshake2(TlsEndpoint&, unsigned int, SocketParams&, LogBase&) (in /home/me/src/myprogram)
==31734==    by 0x627789: TlsProtocol::clientHandshake(char const*, int, TlsEndpoint&, unsigned int, SocketParams&, SharedCertChain*, LogBase&) (in /home/me/src/myprogram)
==31734==    by 0x616855: SChannelChilkat::connectImplicitSsl(char const*, int, bool, int, unsigned int, unsigned int, SystemCerts&, SocketParams&, LogBase&, bool&, SharedCertChain*) (in /home/me/src/myprogram)
==31734==    by 0x56DDEB: Socket2::connect2(char const*, int, bool, bool, int, SystemCerts&, unsigned int, unsigned int, SocketParams&, LogBase&, bool&, int&, SharedCertChain*) (in /home/me/src/myprogram)
==31734==    by 0x56E24F: Socket2::socket2Connect(char const*, int, bool, bool, int, SystemCerts&, unsigned int, unsigned int, SocketParams&, LogBase&, bool&, int&, SharedCertChain*, ClsSocksClient&, ClsHttpProxyClient*) (in /home/me/src/myprogram)
==31734==    by 0x514FD9: Imap::connectToImapServer(char const*, int, StringBuffer&, SharedCertChain*, SystemCerts&, ClsSocksClient&, ClsHttpProxyClient*, LogBase&, ProgressMonitor*) (in /home/me/src/myprogram)
==31734==    by 0x48BB69: ClsImap::Connect(XString&, ProgressEvent*) (in /home/me/src/myprogram)
==31734==    by 0x454A5D: CkImap::Connect(char const*) (in /home/me/src/myprogram)
==31734==    by 0x422C2E: EmailSensorAlertConnection::Connect(char const*, int, bool, char const*, char const*) (emailconnection.cpp:150)
==31734==  Uninitialised value was created by a heap allocation
==31734==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31734==    by 0x47F219: ClsImap::createNewCls() (in /home/me/src/myprogram)
==31734==    by 0x4567EA: CkImap::CkImap() (in /home/me/src/myprogram)
==31734==    by 0x422A13: EmailConnection::EmailConnection(std::string) (emailconnection.cpp:110)
==31734==    by 0x41D364: IMAPConnectionFactory::getIMAPConnection() (imapconnectionfactory.cpp:46)
==31734==    by 0x431362: main (myprogram.cpp:348)
==31734==
==31734== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

Часть myprogram.cpp это:

bool connectRes = m_imap.Connect( server );//line 348

Я пытаюсь найти неинициализированную переменную. Кажется, что это в:ClsImap :: createNewCls (). Я использовал grep для поиска этой функции. Эта функция находится в libchilkat-е / Библиотека / libchilkat-9.5.0.a. Как решить эту проблему? Похоже, проблема в lib. Так я ничего не могу сделать? Я прав?

0

Решение

Задача ещё не решена.

Другие решения


По вопросам рекламы [email protected]