-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Describe the bug
When I try to import rubicon.objc
using Pypy, the process hangs while it allocates more and more memory. I traced this down to this line, and it seems to be related to the PyDictObject
:
rubicon-objc/src/rubicon/objc/ctypes_patch.py
Lines 121 to 132 in 6c3d6b6
class StgDictObject(ctypes.Structure): | |
_fields_ = [ | |
("dict", PyDictObject), | |
("size", ctypes.c_ssize_t), | |
("align", ctypes.c_ssize_t), | |
("length", ctypes.c_ssize_t), | |
("ffi_type_pointer", ffi_type), | |
("proto", ctypes.py_object), | |
("setfunc", SETFUNC), | |
("getfunc", GETFUNC), | |
# There are a few more fields, but we leave them out again because we don't need them. | |
] |
With "traced it down" I mean that I put 1/0
in the code to make it raise an exception. If the it hung instead of raising the exception, then the hangup occurred bedore it. The code above is where it hangs. And if I comment the field with the PyDictObject
, then it does not hang, so it looks like it's related to that.
I tried with pypy3.8-7.3.11 and pypy3.9-7.3.11, both installed via pyenv.
Steps to reproduce
Run import ubicon.objc
in a pypy interpreter. The process hangs, does not respond to ctrl-c.
Expected behavior
I would expect the import to work :)
Screenshots
No response
Environment
MacOS M1 pro Sonoma 14.3
Logs
Additional context
No response