Summary:
Bump the default size so we can symbolize symbols in dynamically linked
binaries with lots and lots of shared libraries :)
folly/experimental/symbolizer/ElfCache.h
```
* Will not grow; once the capacity is reached, lookups for files that
* aren't already in the cache will fail (return nullptr).
class SignalSafeElfCache
```
Reviewed By: ot, philippv
Differential Revision:
D3984649
fbshipit-source-id:
acdca9b9adf6c16f3a1556bc3f57b28844cdd9cc
raise(signum);
}
-constexpr size_t kDefaultCapacity = 500;
-
// Note: not thread-safe, but that's okay, as we only let one thread
// in our signal handler at a time.
//
// Leak it so we don't have to worry about destruction order
-auto gSignalSafeElfCache = new SignalSafeElfCache(kDefaultCapacity);
+auto gSignalSafeElfCache = new SignalSafeElfCache(kFatalSignalHandlerCacheSize);
// Buffered writer (using a fixed-size buffer). We try to write only once
// to prevent interleaving with messages written from other threads.
*/
void installFatalSignalHandler();
+/**
+ * NOTE: The signal handler cache has a fixed size. ELF files for the
+ * binary and DSOs are added to the cache but never removed.
+ *
+ * Addresses from ELF files not in the cache will (silently) NOT be symbolized.
+ */
+constexpr size_t kFatalSignalHandlerCacheSize = 10000;
+
/**
* Add a callback to be run when receiving a fatal signal. They will also
* be called by LOG(FATAL) and abort() (as those raise SIGABRT internally).