summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/float_parse.py
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2018-05-19 11:20:29 -0500
committerDamien George <damien.p.george@gmail.com>2018-05-21 12:48:26 +1000
commitc4dafcef4fe9edaacaeeb16c412c298cbab3b414 (patch)
tree9d6054c0c3de654c9b53482d4d18a8d767d9264b /tests/float/float_parse.py
parent60eb5305f637e21f7ec4006924c06518ca6de476 (diff)
downloadmicropython-c4dafcef4fe9edaacaeeb16c412c298cbab3b414.tar.gz
micropython-c4dafcef4fe9edaacaeeb16c412c298cbab3b414.zip
py/mpz: Avoid undefined behavior at integer overflow in mpz_hash.
Before this, ubsan would detect a problem when executing hash(006699999999999999999999999999999999999999999999999999999999999999999999) ../../py/mpz.c:1539:20: runtime error: left shift of 1067371580458 by 32 places cannot be represented in type 'mp_int_t' (aka 'long') When the overflow does occur it now happens as defined by the rules of unsigned arithmetic.
Diffstat (limited to 'tests/float/float_parse.py')
0 files changed, 0 insertions, 0 deletions