Skip to content

Unable to extract symbols from cython #133

Open
@chrisburr

Description

@chrisburr

In numpy randint is not found (along with everything else from mtrand):

from symbol_exporter.python_so_extractor import CompiledPythonLib
lib = CompiledPythonLib("lib/python3.9/site-packages/numpy/random/mtrand.cpython")
lib.find_symbols()  # == {'methods': [], 'objects': [], 'name': 'mtrand', 'docstring': None}

Disassembling the binary in Ghidra shows that the module's PyInit function is trivial:

void PyInit_mtrand(void)
{
  PyModuleDef_Init(__pyx_moduledef);
  return;
}

though __pyx_moduledef is empty. Something must be filling it though I'm not sure what so I'll have to debug with gdb.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions