meganz / sdk

MEGA C++ SDK
BSD 2-Clause "Simplified" License
1.33k stars 509 forks source link

SDK-1398 - Assorted bug-fixes. #2550

Closed dwmega closed 3 years ago

dwmega commented 3 years ago

This change-set resolves the following bugs:

Heisenbug

After much searching, the great Heisenbug has been vanquished! The crash was the result of a stack corruption that occurred when the integration tests were waiting for syncs to stabilize. The corruption was caused by altering a local variable, by way of completion function, after the function encapsulating that variable had returned.

The bug was solved by waiting for the completion function to return, before escaping the containing function.

Much kudos to Matt Weir for he was the one that isolated this.

Memory Leak

Using AddressSanitizer to hunt the above bug, I learned that there were several minor memory leaks. The first leak was because the sync integration test was not releasing File objects when they were no longer necessary.

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1566) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3909) :+1:

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1567) :+1:

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1568) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs SUCCEDED (1392) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3910) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3911) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs SUCCEDED (1393) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs SUCCEDED (1394) :+1: