logging: suppress ASAN warnings about leaking the LoggerDB singleton
Summary: During program destruction we destroy registered log handlers (to allow them to flush state if desired). However we intentionally leak the LoggerDB object itself and the LogCategory objects it contains, so it will still be safe if static destruction code that runs later still tries to log messages. However, when run with `ASAN_OPTIONS` set to `detect_leaks=1` ASAN complains about the fact that we leak the LoggerDB singleton. This changes the code to store the LoggerDB address in a static variable, to prevent ASAN from complaining that we leak it. Reviewed By: yfeldblum Differential Revision: D6920772 fbshipit-source-id: 62f6837053ba4a538a89b4b61f9b1c722f253d33
Showing
Please register or sign in to comment