Open shinmao opened 9 months ago
Hi, I am wondering why the warning of alignment was suppressed here: https://github.com/benfred/py-spy/blob/492b41c07c26c6edbe061da942c8dae41d86091e/src/python_data_access.rs#L27-L31 bytes comes from the copy method of remoteprocess::ProcessMemory, which would copy and return a series of u8 from another address. Isn't it unsound to to cast to char which is aligned to 4 bytes? Please check and would love to have some discussion:)
bytes
copy
remoteprocess::ProcessMemory
u8
char
The source of unsoundness
Hi, I am wondering why the warning of alignment was suppressed here: https://github.com/benfred/py-spy/blob/492b41c07c26c6edbe061da942c8dae41d86091e/src/python_data_access.rs#L27-L31
bytes
comes from thecopy
method ofremoteprocess::ProcessMemory
, which would copy and return a series ofu8
from another address. Isn't it unsound to to cast tochar
which is aligned to 4 bytes? Please check and would love to have some discussion:)