Segfault with Cython Extension reductable_params during module cleanup

10 views
Skip to first unread message

Vizonex

unread,
Apr 3, 2026, 1:34:19 PM (11 days ago) Apr 3
to cython-users
I made this library for function packing and building extendable plugin-like objects that could filter out arbitrary data on the fly but I can't seem to figure out why it's choosing to crash, it only seems to crash on my GitHub workflow packages in 3.14 but there seems to be other ways of triggering these. Originally I used `cython.freelist` and kept it at around 250 assuming users would use around that many in a smaller application but it seems.

Repo in question: https://github.com/Vizonex/reductable-params
Code: https://github.com/Vizonex/reductable-params/blob/0d82641fb6feb77549ad4865d28138ef5b4f01b6/src/reductable_params/_reduce_c.pyx#L1
Version of Cython: 3.2.4
Issue: https://github.com/Vizonex/reductable-params/issues/3 

I'm making a duplicate of this message as a text file since they seem to be randomly disappearing no clue as to why I'm unable to find messages in this group. :/

David Woods

unread,
Apr 3, 2026, 2:36:40 PM (11 days ago) Apr 3
to cython...@googlegroups.com
From a quick look, there's one recounting issue in `reduce_call` - PyDict_GetItemWithError` returns a borrowed reference while `PyTuple_SET_ITEM` steals a reference. So you definitely lose a reference there.

I'm not sure if that's the only problem though.

Reply all
Reply to author
Forward
0 new messages