Prevent a crash in folly::Symbolizer
authorMark Williams <mwilliams@fb.com>
Mon, 20 Feb 2017 22:53:22 +0000 (14:53 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 20 Feb 2017 23:04:32 +0000 (15:04 -0800)
commitae910818c92677dd9a924751ed8cfc748b44a7c9
tree0cc86216bc7886a2ae5b0e7d44a5341f70d82889
parentf795d501ba155f3fac9ed8bec40cbbc8eb4045ad
Prevent a crash in folly::Symbolizer

Summary:
dbg and dbgo builds of hhvm with gcc-5 crash when generating
backtraces using folly::Symbolizer, because the .debug_aranges for
libc-2.23.so are SHF_COMPRESSED, and folly::Symbolizer doesn't
recognize that.

Just pretend that the section doesn't exist if it has SHF_COMPRESSED
set.

We might eventually want to support decompressing such sections under
an option - but folly::Symbolizer's goal is to just mmap and walk the
debug info without allocating memory (so that it can run while
handling signals etc).

Reviewed By: pixelb

Differential Revision: D4586762

fbshipit-source-id: bef61ed670d1a80caa4f7aac1f80fd2a92cc4ba9
folly/experimental/symbolizer/Dwarf.cpp