From 78b48f1539be4c560198b8b6648e02c2a6934084 Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Thu, 28 Apr 2016 17:21:06 -0700 Subject: [PATCH] don't destory defaultElfCache in exit handlers Summary: As it might be used during global destruction (for example, to symbolize unhandled exception happened at that time). Reviewed By: luciang, ot Differential Revision: D3238303 fb-gh-sync-id: 39d8a6f99d95e700586349436e961f3624c95718 fbshipit-source-id: 39d8a6f99d95e700586349436e961f3624c95718 --- folly/experimental/symbolizer/Symbolizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/experimental/symbolizer/Symbolizer.cpp b/folly/experimental/symbolizer/Symbolizer.cpp index 926e5ffe..e42e4f58 100644 --- a/folly/experimental/symbolizer/Symbolizer.cpp +++ b/folly/experimental/symbolizer/Symbolizer.cpp @@ -171,8 +171,8 @@ bool parseProcMapsLine(StringPiece line, ElfCache* defaultElfCache() { static constexpr size_t defaultCapacity = 500; - static ElfCache cache(defaultCapacity); - return &cache; + static auto cache = new ElfCache(defaultCapacity); + return cache; } } // namespace -- 2.34.1