diff options
author | Jeff Epler <jepler@gmail.com> | 2018-05-19 13:13:02 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-21 12:49:56 +1000 |
commit | 95e43efc994af7d7ff85ef1722eac163be9cc5fd (patch) | |
tree | 5bfda0eef366d02e14e141ca5a75f82612ba352c /tests/float/float_parse.py | |
parent | c4dafcef4fe9edaacaeeb16c412c298cbab3b414 (diff) | |
download | micropython-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