From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 51191385843D for ; Mon, 6 Feb 2023 22:25:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51191385843D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 316Jg1un029793 for ; Mon, 6 Feb 2023 22:25:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=DfH/TxOI+lr+duP+WJOmRe1UPBGlY4pkGNom8bIZ0jw=; b=rW2AHrp6eyz5rWBu4LfTBI4shdx6Y4oCT2giSrJavsSu1iUgByc+hmvVE5PKq/gdzQrR yglrvQ7c2/TDp056oR7XxM3rJVyWdcT7k33Pp0a4XgzYtIMWN2ij96uw+ZPBO5LC/0ni Q4L0iXmpme4k3bVhHx0aW9pI2UVlNHMBe1PZJqywkOybMwIe3OfoaNW8fFS5jGsMCtPP 7jqOeHHnNrK22C/uvZ8v+IUhMSPBhFyU5B4gznHYi/oBI1aWQR1+3tavt3kDOYJtpXE5 xJw85MzDOGNCuHAxJWBHlJFjLZPKdbaLbYWA2RqHP/qMosOL2GQ2FRSO2qMXa8bP4pYl Fw== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nk7x9bq0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Feb 2023 22:25:34 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 316HMtTO001926 for ; Mon, 6 Feb 2023 22:25:32 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3nhf06jutn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Feb 2023 22:25:32 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 316MPT7K41288000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Feb 2023 22:25:29 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 48D4020076; Mon, 6 Feb 2023 22:25:29 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFE4520074; Mon, 6 Feb 2023 22:25:28 +0000 (GMT) Received: from heavy.lan (unknown [9.179.9.231]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Feb 2023 22:25:28 +0000 (GMT) From: Ilya Leoshkevich To: elfutils-devel@sourceware.org Cc: Ilya Leoshkevich Subject: [PATCH RFC 06/11] Initialize reglocs for VMCOREINFO Date: Mon, 6 Feb 2023 23:25:08 +0100 Message-Id: <20230206222513.1773039-7-iii@linux.ibm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230206222513.1773039-1-iii@linux.ibm.com> References: <20230206222513.1773039-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: q_HoCzG5fjowhNy2VLtl25OpNwVinIGe X-Proofpoint-GUID: q_HoCzG5fjowhNy2VLtl25OpNwVinIGe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 malwarescore=0 mlxscore=0 mlxlogscore=770 impostorscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302060191 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: MSan complains: Uninitialized value was created by an allocation of 'reglocs' in the stack frame #0 0x562d35c686f0 in handle_core_note elfutils/src/readelf.c:12674:3 #const Ebl_Register_Location *reglocs; ==1006199==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x562d35c68a2a in handle_core_note elfutils/src/readelf.c:12692:11 #colno = handle_core_registers (ebl, ebl->elf, desc + regs_offset, # reglocs, nregloc); Strictly speaking, this is not a problem, because nregloc == 0, but for other note types we initialize it anyway, so do it here as well. Signed-off-by: Ilya Leoshkevich --- backends/linux-core-note.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c index 9faae4c3..238ec16d 100644 --- a/backends/linux-core-note.c +++ b/backends/linux-core-note.c @@ -239,6 +239,7 @@ EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name, return 0; *regs_offset = 0; *nregloc = 0; + *reglocs = NULL; *nitems = 1; *items = vmcoreinfo_items; return 1; -- 2.39.1