From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43747 invoked by alias); 1 Nov 2018 08:49:15 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 43184 invoked by uid 89); 1 Nov 2018 08:48:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=BAYES_05,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=HAuthentication-Results:amavisd-new, HAuthentication-Results:assumed, HAuthentication-Results:generated, HAuthentication-Results:good X-Spam-Status: No, score=-25.5 required=5.0 tests=BAYES_05,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail.kdab.com Received: from mail.kdab.com (HELO mail.kdab.com) (176.9.126.58) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Nov 2018 08:48:30 +0000 Authentication-Results: mail.kdab.com (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=kdab.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kdab.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from; s=dkim; t= 1541062103; x=1541926104; bh=1perxQzbMHz5JxlbZUk3QSMjvvxdZMUzujV roVZT3K0=; b=Ps00VegcBpc8tS/WuWbQd9UMD5ZF6+I7sQj2Qk6NzNMrtFkk72W 3WHVS7hr7yN69CpJoIEwMw75AMXKO/ONvbSs+nQtVsFBZHZYeN4892KJUSgRLL4w pVu9sZZ4KKMeHE75byvLAscZo7yog6pGodqH6jySk3drqvk3WrdDpY2c= X-Virus-Scanned: amavisd-new at kdab.com From: Milian Wolff To: elfutils-devel@sourceware.org Cc: mark@klomp.org, Milian Wolff Subject: [PATCH] Fix CFI interpretation for locations on DW_CFA_*_loc boundaries Date: Thu, 01 Nov 2018 08:49:00 -0000 Message-Id: <20181101084818.16153-1-milian.wolff@kdab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-q4/txt/msg00090.txt.bz2 According to the DWARF v3 standard =C2=A76.4.3 3., all call frame instructions up to L1 <=3D L2 should be interpreted for an FDE. Elfutils currently only interprets L1 < L2, potentially missing some instructions when L1 directly points at a DW_CFA_*_loc boundary. This patch changes the behavior and makes elfutils behave like libunwind in that regard. --- libdw/cfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdw/cfi.c b/libdw/cfi.c index 341e055b..332c6b8b 100644 --- a/libdw/cfi.c +++ b/libdw/cfi.c @@ -125,7 +125,7 @@ execute_cfi (Dwarf_CFI *cache, fs->regs[regno].value =3D (r_value); \ } while (0) =20 - while (program < end) + while (program <=3D end) { uint8_t opcode =3D *program++; Dwarf_Word regno; --=20 2.19.1