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
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:)
The text was updated successfully, but these errors were encountered:
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.
The source of unsoundness
Hi, we found an unsound implementation in
unpack
which could create a misaligned pointer:rust/src/lib.rs
Lines 900 to 903 in 62a3019
At line 902, the
u8
pointer would cast toTF_TString
which had stronger alignment requirements. The misaligned pointer passed toslice::from_raw_parts
would break the safety guarantee. Please check and happy to have a discussion:)The text was updated successfully, but these errors were encountered: