From: Petr Machata Date: Tue, 8 Mar 2011 19:09:14 +0000 (+0100) Subject: dwarflint: We should not let the abbrev code 0 propagate up X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9793864ba79b399c7713e8d44fa784843c60e83c;p=thirdparty%2Felfutils.git dwarflint: We should not let the abbrev code 0 propagate up --- diff --git a/dwarflint/check_debug_abbrev.cc b/dwarflint/check_debug_abbrev.cc index f2383319f..dd907e509 100644 --- a/dwarflint/check_debug_abbrev.cc +++ b/dwarflint/check_debug_abbrev.cc @@ -381,6 +381,15 @@ namespace break; /* Otherwise validate name and form. */ + if (attrib_name == 0) + { + wr_error (where) << "invalid attribute code 0." << std::endl; + // We can handle this, so keep going. But this is not + // kosher for high-level checks. + failed = true; + continue; + } + attribute = ver->get_attribute (attrib_name); if (attribute == NULL) { diff --git a/dwarflint/tests/run-bad.sh b/dwarflint/tests/run-bad.sh index 38b9be1a3..0219340ed 100755 --- a/dwarflint/tests/run-bad.sh +++ b/dwarflint/tests/run-bad.sh @@ -52,5 +52,5 @@ error: .debug_info: CU 0: toplevel DIE must be either compile_unit or partial_un EOF testrun_compare ./dwarflint --check=@low garbage-3 <