abseil / abseil-cpp

Abseil Common Libraries (C++)
https://abseil.io
Apache License 2.0
14.81k stars 2.59k forks source link

Win32 symbolizer does not call SymCleanup() #752

Open pkasting opened 4 years ago

pkasting commented 4 years ago

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.

caraitto commented 1 month ago

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