diff options
author | Yu Feng <rainwoodman@gmail.com> | 2016-02-02 16:22:42 -0800 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-06-17 19:11:30 -0600 |
commit | f14ad751198b203c7c9ee7b0f8127cd625528a97 (patch) | |
tree | 957976d5bf4a24a74ef142a639ac5025081b569a /numpy/core/fromnumeric.py | |
parent | 4ccf3d7378a5dd9094a7e27c180eda01d7487278 (diff) | |
download | numpy-f14ad751198b203c7c9ee7b0f8127cd625528a97.tar.gz |
BUG: Invalid read of size 4 in PyArray_FromFile
When the input dtype has a subarray, the dtype is DECREFed by
PyArray_NewFromDescr, before dtype->elsize is accessed.
If no one else holds a reference to the dtype object, then the dtype
object will be destroyed, and dtype->elsize shall not be accessed. This
raises an error in Valgrind, and occasionally crashes innocently looking
code. e.g. ```numpy.fromfile('filename', dtype=('f8', 3'))```
This affects versions as early as 1.9.2 (where I found this bug) and
seems to be still relevant today.
Closes #7756.
Diffstat (limited to 'numpy/core/fromnumeric.py')
0 files changed, 0 insertions, 0 deletions