Re:Ty: A fast Python type checker and language server
by lyu07282 on Wednesday May 07, 2025 @06:58PM
(#43921349)
The CPython API is such a dumpster fire, even writing very simple modules the reference counting is very difficult to do correctly. The majority of python modules written in C are probably leaking memory somewhere but nobody knows.
Re:Ty: A fast Python type checker and language server
by amelius on Thursday May 08, 2025 @05:38AM
(#43924586)
My problem is that debugging a segfault in a Python system is impossible because of all the noise generated by Python modules that never bothered to clean up their Valgrind output.
Re:Ty: A fast Python type checker and language server
by badmintonbaseba on Thursday May 08, 2025 @06:38AM
(#43924891)
Some tricks that worked for me in the past:
1. use rr for debugging your binary wheel, you can set up watchpoints, and reverse step/continue from the segfault.
2. compile and run your wheel with sanitizers (ASAN, UBSAN).
I rarely use valgrind so I can't comment on that.
And not directly related, but I wish more python modules did proper checks with Valgrind before shipping.