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
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
Misaligned pointer exposure in <String as TensorType>::unpack #416
At line 902, the u8 pointer would cast to TF_TString which had stronger alignment requirements. The misaligned pointer passed to slice::from_raw_parts would break the safety guarantee. Please check and happy to have a discussion:)
It's not released yet, but as of #418 the TensorType trait is sealed. I'd like to follow up by marking that function as unsafe and hiding it from the docs. It's not intended to be called by client code, and in the code path that uses it internally it simply uses data from the C FFI, which is presumably aligned.
Activity
adamcrume commentedon Mar 13, 2024
It's not released yet, but as of #418 the TensorType trait is sealed. I'd like to follow up by marking that function as
unsafeand hiding it from the docs. It's not intended to be called by client code, and in the code path that uses it internally it simply uses data from the C FFI, which is presumably aligned.