Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Fix a bunch of Coverity-reported defects
- X-seq: zsh-workers 52249
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Fix a bunch of Coverity-reported defects
- Date: Thu, 26 Oct 2023 07:05:29 -0700
- Archived-at: <https://zsh.org/workers/52249>
- In-reply-to: <CAN=4vMoHJKmUy7yyGv7b9L5U_LR4JPPtLLuJ8Xt1vEdBw5LQWw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7a88XNokfYdU4kfbNUAOn_bPPYw1zoRR0im-js_xRWwHQ@mail.gmail.com> <CAN=4vMoHJKmUy7yyGv7b9L5U_LR4JPPtLLuJ8Xt1vEdBw5LQWw@mail.gmail.com>
On Thu, Oct 26, 2023 at 2:19 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Thu, Oct 26, 2023 at 5:37 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > A batch of the warnings that I ignored were assignments of one field
> > of a union to another field of the same union, e.g., a casted long
> > onto a double, etc., which elicited "overlapping copy" warnings.
>
> This can indeed cause problems. The conditions under which it happens
> are subtle. Here's an example: https://godbolt.org/z/EvxTzM1hn.
>
> inline int foo(int* x, float* y) {
> *x = 1;
> *y = 2;
> return *x;
> }
None of the instances flagged by coverity involved indirection through
pointers, so I suspect we're OK there.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author