Clang on Windows crash on memory leak detection
|Assignee:||Miroslav Fidler||% Done:|
|Target version:||Release 2020.2|
I found strange issue during testing GTestUIExample from bazzar. The app crashes at logging memory dump - this is strange. Mirek can you check? It is easily reproducible on Windows.
I know that this custom main may cause problems, however code responsible for memory leaks handling shouldn't crash at all.
#3 Updated by Zbigniew Rebacz over 1 year ago
- Assignee changed from Zbigniew Rebacz to Miroslav Fidler
The crash is in memory leak checking code and exactly in printing "VppLog() << "\n\nHeap leaks detected:\n";" to the screen. This code should be atomic whatever what.
The issue might be related to Clang compiler. You can not debug memory leaks in such case.
Did you try to reproduce on bazaar package? I pushed some fixes, however now bare GTest example is affected by this error.
#4 Updated by Zbigniew Rebacz over 1 year ago
On Linux with clang when I cause leak in the code I have some like that:
Heap leaks detected: --memory-breakpoint__ 1104 : Memory at 0x0x7ffff6a2d720, size 0x1C = 28 +0 0x00007FFFF6A2D720 32 00 00 00 46 72 65 65 46 72 65 65 46 72 65 65 2...FreeFreeFree +16 0x00007FFFF6A2D730 46 72 65 65 46 72 65 65 46 72 65 65 FreeFreeFree ****************** PANIC: Heap leaks detected!
In this case the memory leak log is missing. This is strange and should be fixed.