From patchwork Wed Aug 17 14:41:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 3489 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 41AE223F71 for ; Wed, 17 Aug 2011 14:41:28 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 38688A18674 for ; Wed, 17 Aug 2011 14:41:28 +0000 (UTC) Received: by mail-ew0-f52.google.com with SMTP id 28so546674ewy.11 for ; Wed, 17 Aug 2011 07:41:28 -0700 (PDT) Received: by 10.213.29.147 with SMTP id q19mr1278345ebc.132.1313592087972; Wed, 17 Aug 2011 07:41:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.213.102.5 with SMTP id e5cs21922ebo; Wed, 17 Aug 2011 07:41:27 -0700 (PDT) Received: from mr.google.com ([10.216.237.35]) by 10.216.237.35 with SMTP id x35mr6423076weq.76.1313592087758 (num_hops = 1); Wed, 17 Aug 2011 07:41:27 -0700 (PDT) Received: by 10.216.237.35 with SMTP id x35mr4336761weq.76.1313592087032; Wed, 17 Aug 2011 07:41:27 -0700 (PDT) Received: from mtagate3.uk.ibm.com (mtagate3.uk.ibm.com [194.196.100.163]) by mx.google.com with ESMTPS id w55si78119wec.100.2011.08.17.07.41.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Aug 2011 07:41:26 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.163 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.163; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.163 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p7HEfP0x027458 for ; Wed, 17 Aug 2011 14:41:25 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7HEfOwM2674840 for ; Wed, 17 Aug 2011 15:41:24 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7HEfOFi007886 for ; Wed, 17 Aug 2011 08:41:24 -0600 Received: from leonard.boeblingen.de.ibm.com (dyn-9-152-224-36.boeblingen.de.ibm.com [9.152.224.36]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p7HEfOqx007863; Wed, 17 Aug 2011 08:41:24 -0600 From: Ken Werner To: libunwind-devel@nongnu.org Subject: [PATCH 1/2] ARM: Fix return value of arm_find_proc_info Date: Wed, 17 Aug 2011 16:41:22 +0200 Message-Id: <1313592083-2817-2-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313592083-2817-1-git-send-email-ken.werner@linaro.org> References: <1313592083-2817-1-git-send-email-ken.werner@linaro.org> Initialize the return value with -1 in order prevent arm_find_proc_info from returning zero. This could happen in case the environemtn variable UNW_ARM_UNWIND_METHOD doesn't allow exidx and/or dwarf unwinding. Signed-off-by: Ken Werner --- src/arm/Gex_tables.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/arm/Gex_tables.c b/src/arm/Gex_tables.c index e6ac3ef..5d8c0f4 100644 --- a/src/arm/Gex_tables.c +++ b/src/arm/Gex_tables.c @@ -502,7 +502,7 @@ HIDDEN int arm_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, int need_unwind_info, void *arg) { - int ret = 0; + int ret = -1; intrmask_t saved_mask; Debug (14, "looking for IP=0x%lx\n", (long) ip);