linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH 0/4] Fix shifts-assigns and avoid warns on deadcode
Date: Sat, 15 Aug 2020 18:59:49 +0900	[thread overview]
Message-ID: <20200815095949.GV80756@lianli.shorne-pla.net> (raw)
In-Reply-To: <20200806193003.10144-1-luc.vanoostenryck@gmail.com>

On Thu, Aug 06, 2020 at 09:29:59PM +0200, Luc Van Oostenryck wrote:
> Sparse warns shifts by a negative or oversized amount but
> it does this even on code that will not be executed. It's
> annoying because such warnings are given for generic macros.
> 
> The strategy for these warnings is changed in patch 4:
> they are delayed until after the elimination of deadcode.
> This uncovered a bug in the type evaluation and the linearization
> of shift-assigns which is now solved in patch 2 & 3.
> 
> Thanks to Stafford Horne to bring this back to my attention.
> 
> This series is available for testing & review at:
>   git://git.kernel.org/pub/scm/devel/sparse/sparse.git bad-shift-equal

Thanks!

I see you merged this already, I tested it and see no regressions on my kernel
build, and confirm the xchg issues are fixed.

Sorry, I reviewed this early but didn't respond until now as I had time to test.

I just had one question on 4/4.

-Stafford

> Luc Van Oostenryck (4):
>   shift-assign: add more testcases for bogus linearization
>   shift-assign: fix linearization of shift-assign
>   shift-assign: restrict shift count to unsigned int
>   bad-shift: wait dead code elimination to warn about bad shifts
> 
>  evaluate.c                         |  11 +-
>  expand.c                           |  18 --
>  linearize.c                        |  44 ++++
>  simplify.c                         |  20 +-
>  validation/expand/bad-shift.c      |   8 +-
>  validation/linear/bug-assign-op0.c |   1 -
>  validation/linear/shift-assign1.c  | 319 +++++++++++++++++++++++++++++
>  validation/linear/shift-assign2.c  |  53 +++++
>  validation/optim/shift-big.c       |  12 +-
>  validation/shift-negative.c        |   4 +-
>  validation/shift-undef-long.c      |   7 +-
>  validation/shift-undef.c           |  52 ++---
>  12 files changed, 462 insertions(+), 87 deletions(-)
>  create mode 100644 validation/linear/shift-assign1.c
>  create mode 100644 validation/linear/shift-assign2.c
> 
> 
> base-commit: 4c6cbe557c48205f9b3d2aae4c166cd66446b240
> -- 
> 2.28.0
> 

  parent reply	other threads:[~2020-08-15 21:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 19:29 [PATCH 0/4] Fix shifts-assigns and avoid warns on deadcode Luc Van Oostenryck
2020-08-06 19:30 ` [PATCH 1/4] shift-assign: add more testcases for bogus linearization Luc Van Oostenryck
2020-08-06 19:30 ` [PATCH 2/4] shift-assign: fix linearization of shift-assign Luc Van Oostenryck
2020-08-06 19:30 ` [PATCH 3/4] shift-assign: restrict shift count to unsigned int Luc Van Oostenryck
2020-08-06 19:30 ` [PATCH 4/4] bad-shift: wait dead code elimination to warn about bad shifts Luc Van Oostenryck
2020-08-15  9:57   ` Stafford Horne
2020-08-15 11:15     ` Luc Van Oostenryck
2020-08-15 13:51       ` Stafford Horne
2020-08-15  9:59 ` Stafford Horne [this message]
2020-08-15 11:03   ` [PATCH 0/4] Fix shifts-assigns and avoid warns on deadcode Luc Van Oostenryck

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=20200815095949.GV80756@lianli.shorne-pla.net \
    --to=shorne@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    /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.
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).