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
Fix lifetime issue of PyBundledModule bytes object (#1108)
Summary:
Pull Request resolved: #1108
The PyBundledModule stores a raw pointer into a buffer, but the problem is that
there's no guarantee that the input `py::bytes` object is still alive later when the
PyBundledModule is used, leading to an ASAN error.
Fix this by storing a refcounted `py::bytes` object instead of a raw pointer in the
mirrored C++ object. This will prevent the refcount from going to zero while the
PyBundledModule object is still alive.
Reviewed By: JacobSzwejbka
Differential Revision: D50670477
fbshipit-source-id: 3de4f5c2eee125a2d9552bc206d2091bf4879e84
0 commit comments