zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Fix a bunch of Coverity-reported defects
Date: Thu, 26 Oct 2023 07:25:27 -0700	[thread overview]
Message-ID: <CAH+w=7YnOxFCgWXqPwK36VyrZJRP-R1MGUHYc8cZECLxO-Jd6A@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3TE5cQ+f8=mvvQ=CxppfMRKhRh2boz7PWRyoexFWcrSYQ@mail.gmail.com>

On Thu, Oct 26, 2023 at 1:19 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> On 10/26/23, Bart Schaefer <schaefer@brasslantern.com> 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.


  reply	other threads:[~2023-10-26 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26  3:36 Bart Schaefer
2023-10-26  8:19 ` Mikael Magnusson
2023-10-26 14:25   ` Bart Schaefer [this message]
2023-10-26 14:42     ` zeurkous
2023-10-26  8:28 ` Peter Stephenson
2023-10-26  9:19 ` Roman Perepelitsa
2023-10-26 14:05   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7YnOxFCgWXqPwK36VyrZJRP-R1MGUHYc8cZECLxO-Jd6A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).