summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/float_parse.py
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2018-05-19 13:13:02 -0500
committerDamien George <damien.p.george@gmail.com>2018-05-21 12:49:56 +1000
commit95e43efc994af7d7ff85ef1722eac163be9cc5fd (patch)
tree5bfda0eef366d02e14e141ca5a75f82612ba352c /tests/float/float_parse.py
parentc4dafcef4fe9edaacaeeb16c412c298cbab3b414 (diff)
downloadmicropython-95e43efc994af7d7ff85ef1722eac163be9cc5fd.tar.gz
micropython-95e43efc994af7d7ff85ef1722eac163be9cc5fd.zip
py/objfloat: Fix undefined integer behavior hashing negative zero.
Under ubsan, when evaluating hash(-0.) the following diagnostic occurs: ../../py/objfloat.c:102:15: runtime error: negation of -9223372036854775808 cannot be represented in type 'mp_int_t' (aka 'long'); cast to an unsigned type to negate this value to itself So do just that, to tell the compiler that we want to perform this operation using modulo arithmetic rules.
Diffstat (limited to 'tests/float/float_parse.py')
0 files changed, 0 insertions, 0 deletions