From patchwork Mon Jan 29 23:17:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 193729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp885884dyb; Mon, 29 Jan 2024 15:17:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEilx0i1TaE6XqxNC49hGAO/xkOgwi6ilOY8Y+TCx1KEDdrSPQRqxdRNOy70Vn8Hd0TnFXG X-Received: by 2002:a05:622a:30f:b0:42a:7372:b847 with SMTP id q15-20020a05622a030f00b0042a7372b847mr7158798qtw.22.1706570245589; Mon, 29 Jan 2024 15:17:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706570245; cv=pass; d=google.com; s=arc-20160816; b=NJY57+QQG9uD1rhOojQ/qzkIUuOQHYLKynSCrfzdcD7bpyPtQcKPwSoO+4oqUT48P9 xT7L4C2KP/LIE2xOXVXE2WOqnphTYRi2RlXlNPFoFuMZimgAS8Mz2yt7oQB/xSTg/x5O oZXTBW5rWv90dQ0kyVomYVeNQ9zToLI4rPuxBgH/cgRwvTnJWgckhS6HuxIKznj0Idk+ B7AigV/AnWWfb1fDHt71yX8027Dbl/CQFP4oi2PEiDuBpc0znYSCwHbq5yPh4uzoUWoC M6+/AfqqyRufziGeR//r4AbgXsjmbqInHhuI1FdXEE1BY14+woIxmPIPjgaLaD6JrWKf S8TA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=GVJkRmtEgZeQIraLkHnItIfH1UoW/6jn0vmvLNqUYvc=; fh=NLxAvL/bDfPg4AGOtxqvQlND8vazkZrNzKLY8+LAbBY=; b=hK7zXb4gzp56LkwUyLypY2DZ/NSg/brtXSiYqsKELPcZKCDwR21XvK4alaRAHYrn6G fyNWFTsdeLm9fOb6ke54hIc/EjEUKLvQtZS3EJcf34rKxcz7IvfrZCxbC65C74oGmtxt UGRCPU8wTKkbCtI9caWDAzNuRsejG/1hH/ZV7ePalgSJZijk2ldDcpyxsWfKMC3GL5Z+ pfUwyfbs8dLKgZiyuRuyRyQCoTs2iP4/mKY41St+hdaDoU7YbUXlTPJbGypqxD2Vd5zF 4k3RQRgRK6nrDKoCl/53sK8WMfzNYawHlTEXtUmcAUxG2Ct1ynVDWAm/HFz5TXI47ud8 MfBA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MoERjgMx; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d2-20020ac85ac2000000b0042a2112b22csi8635501qtd.732.2024.01.29.15.17.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:17:25 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MoERjgMx; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D8443858037 for ; Mon, 29 Jan 2024 23:17:25 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 07CE63858432 for ; Mon, 29 Jan 2024 23:17:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07CE63858432 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 07CE63858432 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706570233; cv=none; b=qv5/4iYzPafLPN+mjPKTjsA/48ECTnn+YvlBfMiREvErN4zFjSk7VRnDa25Q88NuLCun3k14ARP3DHqGTSdajuOw61shvppGXxH4TL7BA/eM9Z2H1hSiXxTU8PKZrEoPpEhniOi9l+/p47+fpt66oUxpCflCYdP+wNpTcadUGC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706570233; c=relaxed/simple; bh=BnTovPle4sJoI7npzLb4i5R0XIHOBMe8dGl2asQqugQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=szBuB4zceNX3Sn9VVW2CXqHoek3CwS/a4lCS7cTTotUGDh1XelhybIc+2DaHb5xtz2rc1Ia22gKAdJ+z36lBdfj8GrzCOWBFWU+0c+DESK0tWtXH5L/tmk5RlSYnWGb6KYbyXdd5dzXkJzC2co++mSB8gOAG88PK4QbRjzQSLBo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1d76671e5a4so24098835ad.0 for ; Mon, 29 Jan 2024 15:17:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706570230; x=1707175030; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=GVJkRmtEgZeQIraLkHnItIfH1UoW/6jn0vmvLNqUYvc=; b=MoERjgMxjxadMgxPmkghbqDECBVYwA9DdWtEQQOIITD1e5l1HjuCkrY2wOjTqzJcJX fAlk/jGwUoLrUTB1hbHP28J6Xr9C7GcXgmE3DBxFDiwMZoWTG36VyNT2Da4GWEEWzFPu Noq97VgoQw07EHRNX1fNw+Z5EIU9aTZYiq6iUNQ8dNLfG+FQ+AxduQ/CxSuHN/AYACrS 4COUdXTK39L4KB1xWmjGu/aNwrxuxzYoGB5inOnBKqrOc4yIV7yhXTIdFTmK70ZlXmUe 7EaEuFuWrc8aZztuTg8Pv4EKclkvEp8XgJ75Pob0mwjQAPqgTFTiringDpehC22gHruF GB1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706570230; x=1707175030; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GVJkRmtEgZeQIraLkHnItIfH1UoW/6jn0vmvLNqUYvc=; b=S2te3BupfDxFPz935CVczAUq7/3aAuVWDQ2f8CcBby+Og1pIVASW8yVunt8NWoCBQe wVtpp2pRdOp/yg9kYcIy2UzVj7Bctn0kE8Ss17mo8yAeQvvHRTxrw/kSAa9ColMM3q62 NGkNpK5HxIx1K7Ae88H7DHxnwACRwb2SjOlRmCDhRl9hfnZ1X9Vac075YV6oQzWmiOJR mognbtt/5lh4bT1attdM8Je2QkUEgi4rMOYL3NsQBVjX6DgIGFAdN0eoMYXzBOGiecya sjn6Qe3fQ15oNtx4did0WtpTSts6O66KG4zVPELhG6h/WtJ4TmoHiwDBOiB50k5x5k8h YARA== X-Gm-Message-State: AOJu0YyOXh7+USM+QitbsOiXj5Xy2HPOn7pNQ6OtEBOerhcB6tsiYaIA 3RkmYQq/mZIkZxHEpYyh97A5m0r5FI3WLO8N3jSmCFnjh8hEE96aPA9pTLQq X-Received: by 2002:a17:902:f68a:b0:1d7:83e4:a19 with SMTP id l10-20020a170902f68a00b001d783e40a19mr7108609plg.33.1706570230077; Mon, 29 Jan 2024 15:17:10 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id r18-20020a170902c61200b001d8f0e4bc32sm1730962plr.144.2024.01.29.15.17.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:17:09 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id E402B11409D6; Tue, 30 Jan 2024 09:47:06 +1030 (ACDT) Date: Tue, 30 Jan 2024 09:47:06 +1030 From: Alan Modra To: binutils@sourceware.org Subject: PR31314, chew crashing on use of uninitialized value Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3033.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789468601591103796 X-GMAIL-MSGID: 1789468601591103796 The "drop" call in wrap_comment already increments pc. Defining DOCDD in proto.str is a warning fix. PR 31314 * chew.c (wrap_comment): Don't increment pc. * proto.str (DOCDD): Define. diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c index 28c8072c272..842d4153005 100644 --- a/bfd/doc/chew.c +++ b/bfd/doc/chew.c @@ -541,8 +541,6 @@ wrap_comment (void) overwrite_string (tos - 1, &out); drop (); - - pc++; } /* Mod tos so that only lines with leading dots remain */ diff --git a/bfd/doc/proto.str b/bfd/doc/proto.str index ee06c31fa7c..9a56397d719 100644 --- a/bfd/doc/proto.str +++ b/bfd/doc/proto.str @@ -166,6 +166,7 @@ : SUBSUBSECTION ignore ; : INODE ignore ; : DESCRIPTION ignore ; +: DOCDD ignore ; : ENDDD EXTERNAL ; : FUNCTION EXTERNAL ; : INTERNAL_FUNCTION INTERNAL ;