From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 717503858C53 for ; Fri, 25 Aug 2023 02:22:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 717503858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1bc63ef9959so4399735ad.2 for ; Thu, 24 Aug 2023 19:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692930156; x=1693534956; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=b/Gk5JAxzO7yUAY/BmhHSw//Ex1NzWZcJyX/0mMh0j8=; b=PbV5c7dBoa5MIxKV2/u9pImjpsBNvHknEfT4LS3aeWtj0hSpd3zwBVLYMqL3NTsebh gZrw/3dOwfJQCEkepmGwVV2x1fx6fqSeUzt1LR89i23UULuIJrXnWmu5XnlB9ca/iQP1 msnap0sHpU9Kq6wXnFmsbKX3gn9Em+JR7w/Weu9/qwfyKJTpJGuyK1eEHmXqMEQrqlME 71tm6gTCQ17Beb0H4x5vBX8Ew1LA2boVoulkON13Wt4OgPSImiZOGfkRgkB+AfgWVLbt KD82723GkiV8GaTltEYdd2kENp6/RA9X0t8fhoDoTTD/ChCFN/ROybeah/zW81bk7Lll yOdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692930156; x=1693534956; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b/Gk5JAxzO7yUAY/BmhHSw//Ex1NzWZcJyX/0mMh0j8=; b=czCFqhOiBpAxaSZfr1JM5HA/l38hKjDOLjbqfsShdp2cZM+WJPLBnvIKe97LBzf/d5 YYDyP0NtZWPWg6n5eWy9lgORXFAKPPivwhxZrRsJBsZFBkRYQQjb26+3LGRDCjtcrhx5 OkD4UbuZawsPho+JGngYhu4T9YVr1WCgemWo1krlhAadCmAIgrMQY8Jr9F/oZ3uJWVZy 47nhE/84QhYfnFvjIwM9mZrB8gk3JjTUDg+JjYhH+qUmuh5uStobZOzdbsO5Vu/bT85C 4ij0n4sALWiYUo9qegFQvaWGy8L01AHXBaRXx2/eXAWrMbdX6SEu5AfcuRlFo6IRVF0Y fv3w== X-Gm-Message-State: AOJu0YzZFWHh0tX72zXKOnMJv/0BRPeLBO5YqN5otDwTsQU5uprCudwv W8qZJd5tVqP7Tache1kSp1E= X-Google-Smtp-Source: AGHT+IHNhbP9N3bXkSUkTun2ITioPOt755mA1bqI0m3NJ/dDITrgTjYq2XLNTrcd5Ipg4oFS+E3dDA== X-Received: by 2002:a17:902:e88f:b0:1c0:afdb:1e6c with SMTP id w15-20020a170902e88f00b001c0afdb1e6cmr7460335plg.8.1692930156297; Thu, 24 Aug 2023 19:22:36 -0700 (PDT) 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 a11-20020a170902b58b00b001bc9bfaba3esm387670pls.126.2023.08.24.19.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 19:22:35 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 1E1271142D13; Fri, 25 Aug 2023 11:52:33 +0930 (ACST) Date: Fri, 25 Aug 2023 11:52:33 +0930 From: Alan Modra To: =?iso-8859-1?Q?Torbj=F6rn?= SVENSSON Cc: binutils@sourceware.org, Yvan ROUX Subject: Re: [PATCH] libctf: ctf_member_next needs to return (ssize_t)-1 on error Message-ID: References: <20230824113249.1197514-1-torbjorn.svensson@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230824113249.1197514-1-torbjorn.svensson@foss.st.com> X-Spam-Status: No, score=-3034.2 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 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: On Thu, Aug 24, 2023 at 01:32:49PM +0200, Torbjörn SVENSSON via Binutils wrote: > diff --git a/libctf/ctf-types.c b/libctf/ctf-types.c > index c20ff825d9a..058b647ba9a 100644 > --- a/libctf/ctf-types.c > +++ b/libctf/ctf-types.c > @@ -233,7 +233,8 @@ ctf_member_next (ctf_dict_t *fp, ctf_id_t type, ctf_next_t **it, > end_iter: > ctf_next_destroy (i); > *it = NULL; > - return ctf_set_errno (ofp, ECTF_NEXT_END); > + ctf_set_errno (ofp, ECTF_NEXT_END); > + return -1; > } > > /* Iterate over the members of an ENUM. We pass the string name and associated This isn't the correct fix. There are many uses of ctf_set_errno, even in the function you are patching. Some other fix is needed to cope with unsigned long being smaller than ssize_t for the Microsoft 64-bit ABIs. -- Alan Modra Australia Development Lab, IBM