Skip to content

Passing MagicMock to np.dtype causes a segmentation fault #12982

@roachlord

Description

@roachlord

Passing MagicMock to np.dtype causes a segmentation fault. Original issue raised in Pandas

Reproducing code example:

from unittest.mock import MagicMock
import numpy as np

np.dtype(MagicMock())

Error message:

$ gdb --args python runtests.py -g --python mytest.py
Starting program: /home/vagrant/numpy/venv3/bin/python runtests.py -g --python mytest.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Building, see build.log...
Build OK
Enabling display of all warnings

Program received signal SIGSEGV, Segmentation fault.
0x000000000059f332 in ?? ()

Numpy/Python version information:

1.16.1 3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy