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
This code is broken in both 2.9.2 and 2.10.0. If I remove the initialize_interpreter/finalize_interpreter and instead use the scooted_interpreture guard, it works fine in both 2.9.2 and 2.10.0.
With the original reproducer, mod_py is destructed only after the interpreter is finalized, causing a SEGFAULT in Python/pystate.c _Py_GetConfig() in my environment (I used gdb to see that). (The free(): invalid pointer you saw is probably just another symptom of undefined behavior.)
Required prerequisites
Problem description
I'm using pybind11 to build a c++ main program that importing a python package ruptures at runtime.
We can simplly install it by
pip3 install ruptures
.I tried ruptures-1.1.6 and 1.1.7, results are same.
Once I call
py::finalize_interpreter();
in c++, the program crashs.Error output:
Reproducible example code
The text was updated successfully, but these errors were encountered: