abseil-cpp icon indicating copy to clipboard operation
abseil-cpp copied to clipboard

Win32 symbolizer does not call SymCleanup()

Open pkasting opened this issue 5 years ago • 2 comments

absl/debugging/symbolize_win32.inc implements the symbolizer code for win32. However, while it calls SymInitialize() to init the symbolizer, it never calls SymCleanup() to tear it down correctly.

Per https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-symcleanup, "Failure to call this function causes memory and resource leaks in the calling application".

Probably the safest solution would be to replace InitializeSymbolizer() with e. g. a Symbolizer scoping object that could handle initialization and cleanup.

pkasting avatar Jul 31 '20 04:07 pkasting

FYI, we're continuing to see test flakes in Chromium that may be caused by this issue: crbug.com/41496717.

caraitto avatar Aug 14 '24 19:08 caraitto

@caraitto @pkasting I created #1871 for crbug.com/41496717. I don't think that not calling SymCleanup is the cause of the test flakiness we observe in Chromium. #1870 addresses the flakiness issue. I tested it locally on my devbox an couldn't observe any flakiness.

gabrielsanbrito avatar Apr 11 '25 01:04 gabrielsanbrito