Larry Hastings added the comment:
Inada-san, while it is best to not call PyDict_ functions without holding the
GIL, it doesn't matter unless one creates a second thread. The GIL doesn't
even exist until Python creates a second thread.
But, I too don't want bugs.python.org to become a
Inada Naoki added the comment:
At first glance, you used ctypes.cdll, which releases GIL. But you called
Python/C API in extension module. You shouldn't do it.
Try ctypes.pydll, which don't release GIL.
If it doesn't help you, please continue it in another communities.
I don't want to make
Apoorv Reddy added the comment:
Greetings Larry !
I apologize for spamming so many people. I was hoping to get some insight into
this ! Could you let me know to whom I could reach out for help ? I've included
tehybel as I saw that he has raised/resolved some issues with PyDict in the
past.
Larry Hastings added the comment:
It's not surprising that you crashed the CPython interpreter by using
ctypes--it's very easy to do by accident, or via a bug in your own code.
That's why we don't accept crash reports involving ctypes.
Also, it's rude to "nosy" so many people, particularly
Change by Apoorv Reddy :
--
nosy: +amaury.forgeotdarc, belopolsky, benjamin.peterson, christian.heimes,
duaneg, ebarry, georg.brandl, inada.naoki, larry, meador.inge, ned.deily,
rhettinger, serhiy.storchaka, tehybel
___
Python tracker
New submission from Apoorv Reddy :
I'm trying to use ctypes to speed up an internal function in my project.
However, I'm getting a segmentation fault on a simple dictionary lookup in my C
Code, on PyDict_GetItem(dict, key).
I have supplied a minimal version of the code I'm trying in C, which