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
The code in number_streams is cool, but from a cursory look it seems to cast a u8 pointer directly to a u64 pointer, which is not correct in general.
This depends on the platform / architecture, some tolerate loading from ill aligned addresses fine and some don't. x86-64 is generally fine, and why we don't see much trouble, but on other platforms you will.
This blog mentions using memcpy to let the compiler decide how to load from a possibly ill aligned address. This is what google's farmhash does too, and it's also what I updated SipHash to do, see rust-lang/rust#27280.
The text was updated successfully, but these errors were encountered:
The code in number_streams is cool, but from a cursory look it seems to cast a u8 pointer directly to a u64 pointer, which is not correct in general.
This depends on the platform / architecture, some tolerate loading from ill aligned addresses fine and some don't. x86-64 is generally fine, and why we don't see much trouble, but on other platforms you will.
This blog mentions using
memcpy
to let the compiler decide how to load from a possibly ill aligned address. This is what google's farmhash does too, and it's also what I updated SipHash to do, see rust-lang/rust#27280.The text was updated successfully, but these errors were encountered: