Bug #2064

Clang on Windows crash on memory leak detection

Added by Zbigniew Rebacz almost 2 years ago. Updated almost 2 years ago.

Status:RejectedStart date:09/12/2020
Priority:HighDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:CoreSpent time:-
Target version:Release 2020.2

Description

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.

History

#1 Updated by Miroslav Fidler almost 2 years ago

Thats intentional. We always crash on panic.

Mirek

#2 Updated by Miroslav Fidler almost 2 years ago

  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

#3 Updated by Zbigniew Rebacz almost 2 years 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 almost 2 years 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.

#5 Updated by Zbigniew Rebacz almost 2 years ago

Seems that race condition in critical sections. It is no longer reproduce when memory ignore blocks are present in gtest library.

#6 Updated by Zbigniew Rebacz almost 2 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF