Bug #110516 Github sample code memory leaks
| Submitted: | 27 Mar 2023 17:21 | Modified: | 28 Jun 2024 13:11 |
|---|---|---|---|
| Reporter: | Vitalii Kaplenko | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | Connector / C++ | Severity: | S3 (Non-critical) |
| Version: | 8.0.32 | OS: | Ubuntu (22.04) |
| Assigned to: | Assigned Account | CPU Architecture: | x86 (Intel Core i5 10th GEN) |
| Tags: | connector c++, debug builds, Sample, valgrind error | ||
[27 Mar 2023 17:21]
Vitalii Kaplenko
[10 Apr 2023 17:28]
Vitalii Kaplenko
When I've tried to compile & run
// === main.cpp ===
#include <iostream>
int main()
{}
// ================
$ valgrind --leak-check=full ./mainExecutable
==43334== Memcheck, a memory error detector
==43334== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==43334== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==43334== Command: ./memorier
==43334==
==43334==
==43334== HEAP SUMMARY:
==43334== in use at exit: 0 bytes in 0 blocks
==43334== total heap usage: 1 allocs, 1 frees, 72,704 bytes allocated
==43334==
==43334== All heap blocks were freed -- no leaks are possible
It was fine, But
When I've tried to compile & run
// === main.cpp ===
#include <iostream>
#include <mysqlx/xdevapi.h>
int main()
{}
// ================
$ valgrind --leak-check=full ./mainExecutable
==43479== Memcheck, a memory error detector
==43479== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==43479== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==43479== Command: ./memorier
==43479==
==43479==
==43479== HEAP SUMMARY:
==43479== in use at exit: 80 bytes in 2 blocks
==43479== total heap usage: 417 allocs, 415 frees, 99,049 bytes allocated
==43479==
==43479== LEAK SUMMARY:
==43479== definitely lost: 0 bytes in 0 blocks
==43479== indirectly lost: 0 bytes in 0 blocks
==43479== possibly lost: 0 bytes in 0 blocks
==43479== still reachable: 80 bytes in 2 blocks
==43479== suppressed: 0 bytes in 0 blocks
==43479== Reachable blocks (those to which a pointer was found) are not shown.
==43479== To see them, rerun with: --leak-check=full --show-leak-kinds=all
So adding
#include <mysqlx/xdevapi.h>
to empty cpp-file with the only
int main(){}
causes memory leaks.
[28 May 2024 13:11]
MySQL Verification Team
Hello Vitalii Kaplenko, Thank you for the bug report. Please upgrade to latest version and report us back if issue persist even in latest version along with test case. Thank you. Regards, Ashwini Patil
[29 Jun 2024 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.