diff options
author | Jeff Epler <jepler@gmail.com> | 2018-05-19 11:25:03 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-21 12:42:22 +1000 |
commit | 60eb5305f637e21f7ec4006924c06518ca6de476 (patch) | |
tree | e3ae16cfcbef19fc5c28d87dcc15b75bdd722852 /tests/float/float_parse.py | |
parent | 4f71a2a75a71b89dad2eed147d6e237b633b878e (diff) | |
download | micropython-60eb5305f637e21f7ec4006924c06518ca6de476.tar.gz micropython-60eb5305f637e21f7ec4006924c06518ca6de476.zip |
py/objfloat: Fix undefined shifting behavior in high-quality float hash.
When computing e.g. hash(0.4e3) with ubsan enabled, a diagnostic like the
following would occur:
../../py/objfloat.c:91:30: runtime error: shift exponent 44 is too
large for 32-bit type 'int'
By casting constant "1" to the right type the intended value is preserved.
Diffstat (limited to 'tests/float/float_parse.py')
0 files changed, 0 insertions, 0 deletions