You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't appear to be specific to IntoPyTuple, it also crashes when constructing the tuple from an iterator (I added two more tests to the PR).
Edit: Alright, turns out that I just did the object allocation wrong. For code that still causes a crash, please check this commit. Nevertheless, it should not be possible to cause a SIGSEGV without invoking unsafe code. I suspect the issue essentially runs down to any pyclass auto-implementing ToPyObject with code that transforms a non-mut reference into a PyObject, allowing the resulting object to live longer than the original reference.
athre0z
changed the title
SIGSEGV when using objects created using IntoPyTuple
Auto-implementation of ToPyObject allow for PyObject outliving object
Dec 11, 2018
athre0z
changed the title
Auto-implementation of ToPyObject allow for PyObject outliving object
Auto-implementation of ToPyObject allows PyObject to outlive object
Dec 11, 2018
🌍 Environment
rustc --version
): rustc 1.32.0-nightly (14997d56a 2018-12-05)master
💥 Reproducing
I PRed two tests that reliably reproduce the issue in #307.
The text was updated successfully, but these errors were encountered: