Skip to content

BUG: Choose a more unique PY_ARRAY_UNIQUE_SYMBOL in f2py. - #3014

Merged
charris merged 1 commit into
numpy:masterfrom
bfroehle:f2py_unque_symbol
Mar 2, 2013
Merged

charris merged 1 commit into
numpy:masterfrom
bfroehle:f2py_unque_symbol

Conversation

@bfroehle

Copy link
Copy Markdown
Contributor

In a few exceptional cases where symbols are shared between different Python modules, the use of PyArray_API in f2py (fortranobject.h) conflicts with the regular use of the same symbol in the multiarray module. Generally the symptom of this conflicting use is a segfault when importing a f2py'ed module. This occurs because the module init code somehow overwrites the first element of PyArray_API with the location of PyArray_API, causing a crash when PyArray_GetNDArrayCVersion is called.

Closes gh-2521.

In a few exceptional cases where symbols are shared between different
Python modules the use of `PyArray_API` in f2py (fortranobject.h)
conflicts with the regular use of the same symbol in the multiarray
module. Generally the symptom of this conflicting use is a segfault
when importing a f2py'ed module. This occurs because the module init
code somehow overwrites the first element of `PyArray_API` with the
location of `PyArray_API`, causing a crash when
`PyArray_GetNDArrayCVersion` is called.

Closes numpygh-2521.
@charris

charris commented Mar 2, 2013

Copy link
Copy Markdown
Member

Looks harmless, and certainly an improvement. Now if we could hash the code and use that...

charris added a commit that referenced this pull request Mar 2, 2013
BUG: Choose a more unique PY_ARRAY_UNIQUE_SYMBOL in f2py.
@charris
charris merged commit d21281a into numpy:master Mar 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PyArray_API is *not* a unique symbol. (Trac #1928)

2 participants