Closed myonlylonely closed 1 year ago
Thank you for the bug report, and in particular for the test case. It made it possible to possible to track down the issue. It was indeed a race condition: If the memory pool is being scanned and a debug block is encountered that is in the process of being freed by another thread then it is possible for that block to be reported as corrupted, even though it is not actually the case.
I have pushed a fix for it.
I have tested your fix and it works. https://github.com/pleriche/FastMM5/commit/65ec01f9b9629a90652b344384fb2a477abb7609 Thank you very much. I'll close this issue.
Best regards
Hello,
After enabling
ScanForCorruptionBeforeEveryOperation
, the following application shows 'A memory block header has been corrupted.'. Is that something similar to https://github.com/pleriche/FastMM5/issues/19 due to race condition?ScanForCorruptionBug.zip