From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1945 invoked from network); 26 Oct 2023 14:25:53 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Oct 2023 14:25:53 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1698330353; b=i79UeC/JE7sxWC7mgmMSoM2LDLhAXne2BCZqUlIrpFP/37y0E15MYhJJIQimQBG73r+8E8ZBRU BIqG8EO0NG3ciMFkS90Hzc0ONvu1kJVn2fH8m8tfWTjyPms+mrZ2bklnv9ft83tCbbQa16vjki F3fUf3eqKY5fNFSKeoC4JePLGR3orlqF7x4T7WugOFLRUYLx4y2vfuPFwKrxYOGtaiodsLzyXt J4u26oir/8cEiFDs2etgVFR+S+5Nket5n/T5762fyZf5Q15mgKgPKudYdbLfaMHIpciTbNkwQH 6ZYU0g1PBOldBmADp6PnZF3R0tExIwk7PSGKv8EeF5CxQA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f44.google.com) smtp.remote-ip=209.85.218.44; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1698330353; bh=7hRZ2Jn5dUD7QKnT0ddRpMXZXEAMHz6bwHsUPQ5sXBE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=hzRpxS6JfM1BCdbT/gkmlGAigEA/WXkjXLPCYniImHRTEtJIUHPzVCQX3PgfolUHus/WbQF14o VuFRZIr6mF3FU2lfyrrUgYUOuGcD3bLq3o+ygg7QInQyBj97a4Xr7Vwio57PDNinSlIIhSwFW0 KwXSvLCjSv9VtweeodKUFCJueRRzMIiL+LrAHFA3JESJsfFfkdJdFIye71+vwvz8+P+awQkwWG bDVWZHgAP934WMyjI5/7JUXJYMUXYdhaBOa6eKcp7tnqkwI2bFxkmlmj9SOse4+CBEeLerzHwz +s7NXNLNUplHE6nlTGQk2T0ie/FiurAo+U1dAAgQ8lwdhA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vWZuwJFeVeaiipUiedO+nUr5gW3lJ84azog4zPHA0Ic=; b=Mea5Bqvgq0drnf+nD5TGDsn800 TxMTFT674VERt6Vn/IKc16KC10m3im5hkBqEZzCOibzyMGSgqdok3BNOedNbTIUNyhlRsVxP8RNPO 8dGC/LyUXOImeKr0/bXK5NzgLo/srK97uQFVPXq2tsJjxIpD7Yf65dKTVoJX433x+8cY6xWvNFkDi yTbeQevvZysZoatXgkd+gelU6LyG6t8JFBQH7X4H537c5iPbfqQFSPPE0Ly/29h4owHxk6nWNYfSa sqGA2YlTY3I44SaQxzLPSU178qETo58E8iz5zgLgxNiq051SWp7rC3ijhxX/bt0I+MuYgeYf6cq0f bgnYQiJw==; Received: by zero.zsh.org with local id 1qw1J2-0002vh-VH; Thu, 26 Oct 2023 14:25:52 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f44.google.com) smtp.remote-ip=209.85.218.44; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f44.google.com ([209.85.218.44]:46154) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qw1Ip-0002ci-5A; Thu, 26 Oct 2023 14:25:40 +0000 Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-98377c5d53eso157712366b.0 for ; Thu, 26 Oct 2023 07:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1698330338; x=1698935138; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vWZuwJFeVeaiipUiedO+nUr5gW3lJ84azog4zPHA0Ic=; b=hymJRomg5SXbEOvEEkix7rpWKM28jrK+ZVE1CQd0PaHfiLPy0tMsYz9Oj/68DEJ+ur uYLBJEq2sVOeqt4CKdleDI/mnNCRn6hshqTCzDktd4tlzf2gPF6+SK9EPdY3I/GS0eKF mABrMi1Yi0TTSJ0H/1TaMlfiRZ8qeRdd1FLJm3OeyzbzO05hFHz1EB98+j4u2B7Inj9i X6owlvfTDR48/Eyen4R+W4AOSUQDKoF2unJZ8WqQOXkveWuXMqGLWnz5bRlOrf2rADnp TmWFlTPA4Kiad6hyL6a7a3AFfRiVjCdnDOqcxNmDn7J78CdGj/wt9UoAVNqOw3YVTD0a BbjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698330338; x=1698935138; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vWZuwJFeVeaiipUiedO+nUr5gW3lJ84azog4zPHA0Ic=; b=bFdToHiwbz7Gb2JeL8R9jHUwMx3UG5GVPSPXECvvEPx7tgD3JbK44BO+pzBi4QpZvj IBcXc/Q+MLJGvkecDXkLrhGjPsdDaw76Mf8CB2LMtvd3I8CwxQ7paUbLyEXlrDaD6d2S ZHvK7On+1Qq+cD8G7puD+l2a62baPLV0NwgKHa1EtOCq2Als6vL7hIFGA0yRs5a8ECK7 P1BpI59aJNntZhyXSnEPQ86ApOB22exEaN+LJRtFW39wswfd7fQMZuRMG7uW7ZEzuCRi q5qe6nx8KaQ9JvlatKEyE0/PS3rbgzvka0KtnFpDsNRR+C/VHgptkye/EOgSKqTWbHJ1 G3OQ== X-Gm-Message-State: AOJu0Yz/BRpWXL8WHYGK6bjtauxwOxYaJlibnGqUeeAEG4iQCV6/NNoT aG1J2E6aMGNuAUepomT7WvvRfbEGmqVBSZNAooBhYIHvE50X2t80hL8= X-Google-Smtp-Source: AGHT+IFLaaAUTD3YljWzka3dKpM7+gqAPvrx86PKKN93ky+3SUDyunDH5U7PEPBI8+xQmd864k4rUxbavZsLwPb/t0Y= X-Received: by 2002:a17:907:60d4:b0:9a5:9f3c:9615 with SMTP id hv20-20020a17090760d400b009a59f3c9615mr16687024ejc.63.1698330338485; Thu, 26 Oct 2023 07:25:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Thu, 26 Oct 2023 07:25:27 -0700 Message-ID: Subject: Re: [PATCH] Fix a bunch of Coverity-reported defects To: Mikael Magnusson Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52250 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Thu, Oct 26, 2023 at 1:19=E2=80=AFAM Mikael Magnusson wrote: > > On 10/26/23, Bart Schaefer wrote: > > I triaged about 85 defects in the Coverity scan UI. The majority of > > them were spurious, and I marked them "Ignore". > > One thing to keep in mind is it sometimes groups several "occurrences" > of the same issue together, you can switch them with a combo box near > the bottom right of the UI. (maybe a bit late to point this out now). As far as I could tell each ID number referenced a single occurrence. A lot of them were like this one: > > >>> CID 1547833: Memory - illegal accesses (NEGATIVE_RETURNS) > > >>> Using variable "*lineptr" as an index to array "typtab". > > /Src/hist.c: 3809 in histsplitwords() That is, using a macro to index the typtab array using a *(char*) and complaining that the byte pointed to could be a negative number. In practice this is just not going to happen (or if it does something else is already desperately wrong). Many others were about not checking error status of system calls when in practice there's no sensible recovery mode, e.g., what would we do instead if setting the close-on-exec flag on an fd does not work? > I uploaded a new build to coverity with this patch applied and it > seems to be happy with it. Thanks.