From: Philip Pronin Date: Thu, 13 Oct 2016 17:09:36 +0000 (-0700) Subject: fix .debug_aranges parsing X-Git-Tag: v2016.10.17.00~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f8df999c5f9107a564e658edea3d7da8a5c7c26;p=folly.git fix .debug_aranges parsing Summary: Each sequence of tuples within an entires set is terminated with (0, 0) according to the DWARF standard (see 7.20 in http://www.dwarfstd.org/doc/DWARF4.pdf). Reviewed By: ot, luciang Differential Revision: D4014952 fbshipit-source-id: c4b034c94adc4a0d9b052456c02919a54a79eaf1 --- diff --git a/folly/experimental/symbolizer/Dwarf.cpp b/folly/experimental/symbolizer/Dwarf.cpp index f1087f80..7709dc0b 100644 --- a/folly/experimental/symbolizer/Dwarf.cpp +++ b/folly/experimental/symbolizer/Dwarf.cpp @@ -457,7 +457,7 @@ bool Dwarf::findDebugInfoOffset(uintptr_t address, auto start = read(chunk); auto length = read(chunk); - if (start == 0) { + if (start == 0 && length == 0) { break; }