summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_nanfunctions.py
diff options
context:
space:
mode:
authorYang Li <yangli2@gmail.com>2017-09-12 10:01:48 -0400
committerCharles Harris <charlesr.harris@gmail.com>2017-10-04 12:33:24 -0600
commit8989a31d6ddaaa1f7df0e5da9bdee88cd4900a66 (patch)
tree20c3032755a8d253dbeca0489acaf1666ae43dcd /numpy/lib/tests/test_nanfunctions.py
parent04c43f177dcf156ab85118898d30870a38df70cc (diff)
downloadnumpy-8989a31d6ddaaa1f7df0e5da9bdee88cd4900a66.tar.gz
BUG: Fix possibly undefined cast of double -> long.
Current double to long casting in the zipf function depends on non-standardized behavior when the double is too big to fit in a long. This is potentially dangerous and makes the code fail with tools such as AddressSanitizer. Checks are added here to prevent overflow during casting and make sure we get the desired behavior.
Diffstat (limited to 'numpy/lib/tests/test_nanfunctions.py')
0 files changed, 0 insertions, 0 deletions