From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26856 invoked by alias); 25 Jan 2019 21:20: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 26845 invoked by uid 89); 25 Jan 2019 21:20:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:15.1.1531.3, H*r:171 X-Spam-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx0a-00082601.pphosted.com Received: from mx0a-00082601.pphosted.com (HELO mx0a-00082601.pphosted.com) (67.231.145.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Jan 2019 21:20:13 +0000 Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0PLIF7i005072 for ; Fri, 25 Jan 2019 13:20:11 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=facebook; bh=J2zhaW+Lv7O//L94xC9GBrzsyJ/J6dGxekcLJ8V6m1c=; b=HSh6E31J4Z4BztuhwoIc989BVbes9HYcxCDG3LXfw99Kv8tv+YsMeyLN1SFEN9HiyPIa HH8/FjEVRYVtY1NBZ5M8JhIpfLQy6OwMlkN3dE4r6Z+w0Qpw+8st+qOmUczPoauMoCD/ yiYmqx7t2zUhqdBPQoB2A5/sdobMQEc8j0I= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2q86x00qca-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 25 Jan 2019 13:20:11 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Fri, 25 Jan 2019 13:20:10 -0800 Received: by devbig003.ftw2.facebook.com (Postfix, from userid 128203) id 0F8793702382; Fri, 25 Jan 2019 13:20:10 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig003.ftw2.facebook.com To: , CC: Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH elfutils 2/2] [tests] parse inode in /proc/pid/maps correctly in run-backtrace-data.sh Date: Fri, 25 Jan 2019 21:20:00 -0000 Message-ID: <20190125212009.2775258-3-yhs@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125212009.2775258-1-yhs@fb.com> References: <20190125212009.2775258-1-yhs@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-25_13:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-SW-Source: 2019-q1/txt/msg00088.txt.bz2 The backtrace-data.c parsed the inode in /proc/pid/maps with format "%*x". This caused failure if inode is big. For example, 7f269223d000-7f269226b000 r-xp 00000000 00:50 10224326387095067468 = /home/... The correct format should be "%*lu" to reflect inode "unsigned long" type. But that caused the following compilation error. acktrace-data.c: In function =E2=80=98maps_lookup=E2=80=99: backtrace-data.c:109:22: error: use of assignment suppression and length = modifier together in gnu_scanf format [-Werror=3Dformat=3D] i =3D fscanf (f, "%lx-%lx %*s %lx %*x:%*x %*lu", &start, &end, &offs= et); Fix the test with inode format string "%*s" then. Signed-off-by: Yonghong Song --- tests/backtrace-data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c index 3a91c664..85ae9729 100644 --- a/tests/backtrace-data.c +++ b/tests/backtrace-data.c @@ -106,7 +106,7 @@ maps_lookup (pid_t pid, Dwarf_Addr addr, GElf_Addr *bas= ep) { // 37e3c22000-37e3c23000 rw-p 00022000 00:11 49532 /lib64/ld-2.14.90= .so */ unsigned long start, end, offset; - i =3D fscanf (f, "%lx-%lx %*s %lx %*x:%*x %*x", &start, &end, &offse= t); + i =3D fscanf (f, "%lx-%lx %*s %lx %*x:%*x %*s", &start, &end, &offse= t); assert (errno =3D=3D 0); if (i !=3D 3) break; --=20 2.17.1