[For Help!] The state of _M_weak_this is changed before and after entering pybind11 when a class inherits from enable_shared_from_this #5557
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a simple extension using pybind11. The basic definitions are as follows:
C++ code definitions:
When I tested with very simple code, the code block was entered successfully. However, when attempting to retrieve a pointer from enable_shared_from_this in pybind11, a deadlock occurred.
During debugging, I noticed that after creating the tensor, the pointer state was as shown below,
but after entering pybind11, the pointer state _M_weak_this changed to something different. It is expired!
Could anyone provide assistance? I am not very familiar with pybind11, so any help would be greatly appreciated!
By the way, i run this code on risc-v platform
Beta Was this translation helpful? Give feedback.
All reactions