wolfSSL / wolfMQTT

wolfMQTT is a small, fast, portable MQTT client implementation, including support for TLS 1.3.
https://www.wolfssl.com
GNU General Public License v2.0
518 stars 156 forks source link

Memory leakage issue in version 1.18.0 #393

Closed yunhui0501 closed 5 months ago

yunhui0501 commented 5 months ago

It seems that there is a memory leak in version 1.18.0. Have you encountered this issue?

embhorn commented 5 months ago

Hello @yunhui0501

Could you please provide more details about this issue? Please include the wolfMQTT configuration and any steps / code to reproduce.

Thanks, @embhorn

yunhui0501 commented 5 months ago

Hello @ embhorn

Publish information using the MqttClient function Publish WriteOnly and Check_ Response, but there is a slight increase in memory. I have masked these two functions, so the memory does not increase. During testing, there is a large amount of data for publishing information.

embhorn commented 5 months ago

Hi @yunhui0501

Would it be possible to get a reproducer test case? Or if you could provide a fsanitize report showing the leaked memory, that would be helpful in reviewing this.

yunhui0501 commented 5 months ago

Hello @embhorn
log_yyy.txt

I used the Valgrind tool to output some logs, please see the attachment. Definitely loss type memory leaks seem to be mostly caused by WolfSSL. Do I need to switch to the latest version of WolfSSL? Thank you!

embhorn commented 5 months ago

Hi @yunhui0501

We always recommend using the latest versions of the libraries. If there are still issues after updating, please send a report to support@wolfssl.com so that we can better prioritize this issue.