diff options
author | Mibu287 <41239569+Mibu287@users.noreply.github.com> | 2020-03-19 03:11:59 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-18 15:11:59 -0500 |
commit | c2dd245047ff2eb80972600163ecac9048d74e1f (patch) | |
tree | 849fbc9bd753cf442746f3e688a762ebb9b52fc9 /numpy/lib/function_base.py | |
parent | 5134132ae9cc9c3fba1d5420353277cf3d96eb90 (diff) | |
download | numpy-c2dd245047ff2eb80972600163ecac9048d74e1f.tar.gz |
BUG: Guarantee array is in valid state after memory error occurs in getset.c (#15736)
Currently, in function array_shape_set, ndarray's pointers to dimensions and strides are freed before new array is allocated (Line 71). In case memory error occur, the array is left with dangling pointers. Therefore, we can not recover from such error.
* To guarantee array in valid state when memory error occur
* Fix: Free cache when nd == 0 to avoid memory leak
* Update numpy/core/src/multiarray/getset.c
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Diffstat (limited to 'numpy/lib/function_base.py')
0 files changed, 0 insertions, 0 deletions