Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

MySQL 8.0: Connector/C++ - 8.0.17 - leak? (no replies)

$
0
0
Hi there!

This short test code produces leaks by Valgrind!



{
std::string url = "mysqlx://uname:pwd@host.ip.add.ress:33080/schema";
Session mySession(url);
RowResult res = mySession.sql("SELECT id, username FROM users").execute();
Row row;
while ((row = res.fetchOne())) {
std::cout << "ID: " << row[0] << " - username: " << row[1] << std::endl;
}
mySession.close();
}


Valgrind reports:

"

...
...
==19407== HEAP SUMMARY:
==19407== in use at exit: 1,088 bytes in 2 blocks
==19407== total heap usage: 10,291 allocs, 10,289 frees, 805,113 bytes allocated
==19407==
==19407== Searching for pointers to 2 not-freed blocks
==19407== Checked 204,840 bytes
==19407==
==19407== 64 bytes in 1 blocks are still reachable in loss record 1 of 2
==19407== at 0x4835DEF: operator new(unsigned long) (vg_replace_malloc.c:334)
==19407== by 0x49BC561: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BEF97: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BF233: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49851DB: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49496DE: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x494F9CD: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x492C741: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x492D5A1: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x492E554: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x4921117: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49083C9: mysqlx::abi2::r0::internal::Session_detail::Session_detail(mysqlx::abi2::r0::common::Settings_impl&) (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407==
==19407== 1,024 bytes in 1 blocks are still reachable in loss record 2 of 2
==19407== at 0x4835DEF: operator new(unsigned long) (vg_replace_malloc.c:334)
==19407== by 0x49BCD25: void std::vector<std::pair<void (*)(void const*), void const*>, std::allocator<std::pair<void (*)(void const*), void const*> > >::_M_realloc_insert<std::pair<void (*)(void const*), void const*> >(__gnu_cxx::__n
==19407== by 0x49BC5B2: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BEF02: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BEEF6: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BEEF6: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BEEF6: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49BF25B: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x498508B: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x4956B23: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x493DAF8: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407== by 0x49426C8: ??? (in /usr/lib/x86_64-linux-gnu/libmysqlcppconn8.so.2.8.0.17)
==19407==
==19407== LEAK SUMMARY:
==19407== definitely lost: 0 bytes in 0 blocks
==19407== indirectly lost: 0 bytes in 0 blocks
==19407== possibly lost: 0 bytes in 0 blocks
==19407== still reachable: 1,088 bytes in 2 blocks
==19407== suppressed: 0 bytes in 0 blocks
==19407==
==19407== ERROR SUMMARY: 68125 errors from 626 contexts (suppressed: 0 from 0)
...
.
.
"


Installed libs:
ii libmysqlclient-dev 8.0.17-1debian10 amd64 MySQL development headers
ii libmysqlclient21:amd64 8.0.17-1debian10 amd64 MySQL shared client libraries
ii libmysqlcppconn-dev:amd64 8.0.17-1debian10 amd64 Development header files and libraries for MySQL C++ client applications
ii libmysqlcppconn7:amd64 8.0.17-1debian10 amd64 MySQL Driver for C++ which mimics the JDBC 4.0 API
ii libmysqlcppconn8-2:amd64 8.0.17-1debian10 amd64 MySQL database connector for C++
ii mysql-apt-config 0.8.13-1 all Auto configuration for MySQL APT Repo.
ii mysql-common 8.0.17-1debian10 amd64 Common files shared between packages



Is this false positive or not?


Thx!

Cs

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>