Make ElfFile not crash on invalid ELF files
authorTudor Bosman <tudorb@fb.com>
Wed, 23 Jul 2014 22:16:32 +0000 (15:16 -0700)
committerChip Turner <chip@fb.com>
Fri, 25 Jul 2014 16:07:08 +0000 (09:07 -0700)
commitba00a0d45569463799f67ed37e66c77f0cd6f015
treead58e974b3c74879843a5a7f61e23beac575cf94
parent1274a688d51ee0b82c2eeb0e1f373e9e992722e6
Make ElfFile not crash on invalid ELF files

Summary:
@rkroll wants to run this on more than just fbcode binaries; there are x86 (not
x86_64) binaries in there and probably a lot of other junk. So, if you call
openNoThrow explicitly, you get a pretty error message in this case.

Test Plan: folly/experimental/symbolizer/test

Reviewed By: lucian@fb.com

Subscribers: rkroll, jhj, lesha, kma

FB internal diff: D1453758
folly/experimental/symbolizer/Elf.cpp
folly/experimental/symbolizer/Elf.h
folly/experimental/symbolizer/ElfCache.cpp