-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
portable_atomic_util::Arc::into_raw() returns unaligned reference to the inner type #137
Comments
The problem is that the offset calculation does not take into account the padding after Header.
|
@taiki-e I will write a PR to fix this shortly. |
Ah, since align_of is incompatible with unsized type, it will actually be necessary to use |
This commit fixes taiki-e#137 by considering alignment when converting the raw Arc pointer to and raw its raw representation. Signed-off-by: John Nunley <[email protected]>
This commit fixes #137 by considering alignment when converting the raw Arc pointer to and raw its raw representation. Signed-off-by: John Nunley <[email protected]>
Repro:
The text was updated successfully, but these errors were encountered: