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
What version (or hash if on master) of pybind11 are you using?
2.11.1
Problem description
Trying to access a field of type std::shared_ptr crashes the Python code immediately with double free or corruption.
This looks a bit like the reverse of #1138 because the holder object should be a std::unique_ptr (at least the documentation says that this is the default holder object when no holder is specified) and the actual data instance is a std::shared_ptr. Not quite sure if the underlying cause is basically the same (=> duplicate) or if it makes sense to track it separately?
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.11.1
Problem description
Trying to access a field of type
std::shared_ptr
crashes the Python code immediately withdouble free or corruption
.This looks a bit like the reverse of #1138 because the holder object should be a
std::unique_ptr
(at least the documentation says that this is the default holder object when no holder is specified) and the actual data instance is astd::shared_ptr
. Not quite sure if the underlying cause is basically the same (=> duplicate) or if it makes sense to track it separately?Reproducible example code
C++ code:
Python usage code:
Output:
Is this a regression? Put the last known working version here if it is.
Not a regression
The text was updated successfully, but these errors were encountered: