New submission from Christian Heimes:

Coverity has found undefined behavior in dtoa.c:d2b(). lo0bits() can return 32 
which z >>= 32, where z is an uint32. I've talked to doku at PyCon. He 
suggested to update dtoa.c to a more recent version. Our copy is based on a 
version from 2001. There are more modern versions available, e.g. 
https://searchcode.com/codesearch/view/52748288/ from 2006.

CID 1202735 (#1 of 1): Bad bit shift operation (BAD_SHIFT)
large_shift: In expression z >>= k, right shifting by more than 31 bits has 
undefined behavior. The shift amount, k, is 32.

----------
messages: 241464
nosy: christian.heimes, doko, eric.smith, mark.dickinson, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Undefined behavior in dtoa.c (rshift 32 of 32bit data type)
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23999>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to