From 9f8df999c5f9107a564e658edea3d7da8a5c7c26 Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Thu, 13 Oct 2016 10:09:36 -0700 Subject: [PATCH] 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 --- folly/experimental/symbolizer/Dwarf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1