[PATCH 0/2] enum: fix bug with full width right shift

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

 



These two patches contains a fix for a bug occuring
when trying to do a full width right shift, which is
UB but, more imortantly, which on x86 doesn't give the
result expected here (unchanged value instead of 0).


Luc Van Oostenryck (2):
  enum: add testcase for UB in oversized shift
  enum: fix UB when rshifting by full width

 parse.c                    | 16 ++++++++++++++--
 validation/bug-rshift-ub.c | 16 ++++++++++++++++
 2 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 validation/bug-rshift-ub.c

-- 
2.17.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