[PATCH 00/17] warn & simplify negative or over-sized shifts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The goal of this series is:
* to give a correct & sensible warning on negative or over-sized shifts.
* to add conservative simplification of such shifts.

This series is available for testing & review in the Git repository at:
  git://github.com/lucvoo/sparse-dev.git big-shift

----------------------------------------------------------------

Luc Van Oostenryck (17):
  big-shift: add test for shifts with bad count
  big-shift: mark out-of-range OP_{ASR,LSR,SHL} as tainted
  big-shift: do not evaluate negative or over-sized shifts
  big-shift: don't take the modulo at expand time
  big-shift: move the check into check_shift_count()
  big-shift: use the base type for shift-too-big warning
  big-shift: also check shift count of shift-assignment
  big-shift: do not simplify over-sized OP_ASR to zero
  big-shift: reorder the tests in simplify_asr()
  big-shift: reuse simplify_asr() for LSR & SHL
  big-shift: simplify over-sized OP_LSRs
  big-shift: simplify over-sized OP_SHLs
  big-shift: use the type width for too big shift
  big-shift: fix warning message for negative shift count
  big-shift: fix evaluation of shift-assign
  big-shift: do not truncate the count when checking it
  big-shift: add -Wshift-count-{negative,overflow}

 evaluate.c                    |   5 ++
 expand.c                      |  52 ++++++++---
 lib.c                         |   4 +
 lib.h                         |   2 +
 linearize.c                   |  19 ++++
 simplify.c                    |  37 ++++++--
 sparse.1                      |  12 +++
 validation/optim/shift-big.c  |  34 +++++++
 validation/shift-undef-long.c |  21 +++++
 validation/shift-undef.c      | 164 ++++++++++++++++++++++++++++++++++
 10 files changed, 330 insertions(+), 20 deletions(-)
 create mode 100644 validation/optim/shift-big.c
 create mode 100644 validation/shift-undef-long.c
 create mode 100644 validation/shift-undef.c

-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux